3 answers
You Can try below query
select id,name from account where Id not in(select accountid from contact)
Please check below post to learn about SOQL1) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm2) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships.htm3) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_understanding.htm⌗sforce_api_calls_soql_relationships_understanding4) https://trailhead.salesforce.com/en/apex_database/apex_database_soql5) https://developer.salesforce.com/page/A_Deeper_look_at_SOQL_and_Relationship_Queries_on_Force.comLet us know if this will help you