MockReal Logo
Home
BlogPricing
For Employers →
  1. Home
  2. Questions
  3. Write an SOQL to fetch all Accounts which is not associated with any contacts.

Write an SOQL to fetch all Accounts which is not associated with any contacts.

TechnicalSenior Salesforce DeveloperSalesforce Developer

SELECT Id, Name FROM Account WHERE Id NOT IN (SELECT AccountId FROM Contact)

This SOQL query retrieves all Accounts that are not linked to any Contacts. The subquery checks for AccountId in the Contact object, ensuring we only get accounts without any associated contacts.

More Questions

  • A trigger on the Account object fires on update. It queries a related object inside a for loop, then performs a DML operation inside the same loop. Walk me through what’s wrong and fix it.
  • Can we call the future from the batch?
  • Can you explain the difference between a trigger and a process builder?
  • Can you explain the differences between With Sharing, Without Sharing, and Inherited Sharing?
  • Can you explain the different types of flows in Salesforce?
  • Can you explain the lifecycle hooks in LWC parent-to-child communication?
  • Can you explain your trigger architecture and how you prevent recursion, order dependencies, and side effects?
  • Describe a complex cross-functional project you led on Salesforce. How did you collaborate with Sales, CS, and Finance to get it right?
  • Describe a time you implemented Platform Events or Change Data Capture. Why was it the right fit, and what were the pitfalls?
  • Describe how you’d use Prompt Builder to customize an AI response for a Sales Cloud workflow. What are the compliance guardrails?
MockReal Logo

Spoken interview practice for technical professionals

Product

  • Pricing
  • Questions
  • Positions
  • Resumes
  • For Employers →

Company

  • Careers
  • About Us
  • Contact
  • Blog

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2025 MockReal. Spoken interview practice. All rights reserved.