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
vijju123_1vijju123_1 

SOQL query on account object

hie friends

 

               i have a sinearo that i need a SOQL query on account object in Annual Revenue field.query should display annual revenue >50000 and top 5 of all.thanks in advance

Best Answer chosen by Admin (Salesforce Developers) 
Ashish_SFDCAshish_SFDC

Hi Vijju, 

 

Try the queries below, 

 

SELECT Name
FROM Account
ORDER BY Name DESC NULLS LAST LIMIT 5


SELECT Name FROM Account
WHERE Annual_revenue > 50000

 

Regards,

Ashish

All Answers

Ashish_SFDCAshish_SFDC

Hi Vijju, 

 

Try the queries below, 

 

SELECT Name
FROM Account
ORDER BY Name DESC NULLS LAST LIMIT 5


SELECT Name FROM Account
WHERE Annual_revenue > 50000

 

Regards,

Ashish

This was selected as the best answer
vijju123_1vijju123_1

thnx ashish