Requirment :- I need to fetch the assigned user to the territory for any account.
I have one account with territory and in that territory assigned user count is 5 and there is one user with UserType='Manager'.
I need a Single SOQL query which will fetch the user with UserType='Manager' from Territory
Best Answer
I haven't tested this, but I think using a nested sub-select in the WHERE clause will work for you. You may need to tweak, but I think this will get you close: