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)
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 ORDERORDER
and LIMITLIMIT
in subqueries?