Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Select Id, Name From Account Where Id NOT IN (Select AccountId From Contact)
Accounts that do have at least 1 Contact:
Select Id, Name From Account Where Id IN (Select AccountId From Contact)
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.
You can use the below SOQL to query all the contacts that do not have account:
Select Id from Contact where AccountId = Null
Let me know if you need any other help or information on this.
Thanks,
Abhishek Bansal.