Fetch 5 records from Account object apex code example
Example: soql queries for not contact related account records in salesforce
select id,name from account where Id not in(select accountid from contact)
select id,name from account where Id not in(select accountid from contact)