+ Start a Discussion
Suja RajSuja Raj 

soql query to find users assigned to multiple accounts

Muba SFDCMuba SFDC
If you want find number of user assigned to account, then
select id,name,ownerId from Account where ownerId  ='00519000000udHs'

If you want to find number of contacts associated to account,then
SELECT name FROM Contact WHERE AccountId = '0011900000LlP8T'

 
Ayiravalli ArasuAyiravalli Arasu
Hi Suja Raj,
The below code will help you to find users mapped to multiple accounts
SELECT Name
FROM User
Where Id IN (SELECT OwnerId FROM Account)

Thanks