I want to do a query like this:
SELECT Id, Name, Email
FROM User
WHERE Id IN (
SELECT OwnerId
FROM Opportunity
WHERE AccountId = '001610000085XsNAAU'
ORDER BY LastActivityDate DESC NULLS LAST
LIMIT 1
)
But I have an error:
expecting a right parentheses, found 'ORDER'
Isn't it possible to use ORDER
and LIMIT
in subqueries?