Query Accounts With Contacts and Without Contacts #inSalesforce

Query Accounts With Contacts and Without Contacts


Account(s) with no Contacts:

Select Id, Name From Account Where Id NOT IN (Select AccountId From Contact)


Account(s) with Contact(s)

Select Id, Name From Account Where Id IN (Select AccountId From Contact)

Comments