How to Sort both in Ascending and Descending order in SOQL?

How to Sort both in Ascending and Descending order in SOQL?

Sample:

SELECT Name, CMR_Number__c FROM Account ORDER By Name ASC, AccountSite DESC


Using the above SOQL, accounts will be sorted by Name in ascending order and then by AccountSite in descending order.

Leave a Reply