+ Start a Discussion
Vikas VasudevanVikas Vasudevan 

Help with Soql subquery order by ?

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?