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
Vikas VasudevanVikas Vasudevan 

Help with Soql subquery order by ?

HI,
I am trying to query the result based on order by from inner query but i am not having any luck.

SELECT id,(SELECT CreatedDate FROM Steps ORDER BY CreatedDate DESC LIMIT 1 )  FROM PROCESSINSTANCE WHERE STATUS = 'Pending' order by Steps.CreatedDate desc

This query dont work
I would love to order the main query by Steps Createdate. Is it possible to do so?
Thanks