function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amogh BabhaleAmogh Babhale 

SOQL Query For Admin


Hi Tesm,

I trying to complete the Modudle SOQL for Admins and stuck on one stage.

In the Fourth Stage "Create Relationship Queries with Custom Objects"

The link of the mudle:-https://trailhead.salesforce.com/content/learn/modules/soql-for-admins/create-relationship-queries-with-custom-objects

I not able to colete the chanllenge where it ask to write a query and assign to list.

So the query is that 


Create a query and assign the query results to the list
Get this information:
The name of the property
The broker’s email address
How long the property has been on market
(Hint: Use API names, not field names or field labels)
Object: Property
Condition: The property was listed within the last 30 days

I am Stuck on "Condition" part where they want listed Property is are within 30 days.

I wrote a query  

SELECT Name, Broker__r.Email__c,Days_On_Market__c FROM Property__c  WHERE

but not able to write a logic for WHERE Clause becase the listed date field is Date type field.

So how can we write the logic for WHERE Clause.

Thanks !! 
AbhishekAbhishek (Salesforce Developers) 
Hi,

For all the Trailhead issues please report it here,

https://trailhead.salesforce.com/help?support=home#

https://trailhead.salesforce.com/help

So that our trailhead support engineers will look into it and get back to you.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Regards,
​​​​​​​Salesforce Support.