Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › SOQL to find Accounts without Contacts AND Opportunities in Salesforce

    Tagged: Account, Dynamic SOQL, Salesforce Customization, SOQL

    • Salesforce® Discussions

      SOQL to find Accounts without Contacts AND Opportunities in Salesforce

      Posted by Radhakrishna on August 21, 2017 at 4:05 AM

      I am looking for help to run a Join Query to find all out Accounts in our Database without Contacts AND Opportuntiy. I can run the query indepetly, but I would like to join the queries.

      The Query I am runing to find Accounts without Contacts: Select Id, Name From Account Where Id NOT IN (SELECT AccountId FROM Contacts)
      Query to find Accounts without Opportunties: Select Id, Name From Account Where Id NOT IN (SELECT AccountId FROM Opportunity)

      Shaharyar replied 8 years, 5 months ago 2 Members · 1 Reply
      • Account
      • Dynamic SOQL
      • Salesforce Customization
      • SOQL
    • 1 Reply
    • Shaharyar

      Member
      August 21, 2017 at 5:37 AM

      Hi Radakrishna,

      Use this

      Select Id, Name from Account where ID NOT IN (Select AccountId from Contact) AND ID NOT IN (Select AccountId from Opportunity)

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    Push Notifications

    Best Practices for Push Notifications and In-App Messaging in Salesforce

    Blog in Others, Salesforce

    You receive them usually — the push notifications once you get a match on a qualitative analysis app or once there’s breaking news, they inform…

    Apple, Application, Application Commitment, Bypass Spam Filters, Email Inbox
    Ratnesh Oct 1, 2020
    5,236  Views

    Top 5 Considerations in Choosing Your Salesforce CPQ Partner

    Blog in Salesforce Products

    Congratulations, you’ve made the decision to implement Salesforce CPQ! Now comes the challenging task of choosing the right Salesforce CPQ partner to help fulfill your vision…

    Applications, Approval Process, Automation, Certified Salesforce CPQ Partner, Certified Salesforce Partners
    LevelShift (formerly DemandBlue) Aug 9, 2021
    3,066  Views

    How Does A Salesforce Consultant Shape Effective Business Strategy?

    Blog in Salesforce Consultant

    Salesforce has become one of the most popular business software in recent times. Using the same, several businesses have been effectively able to manage their…

    Automation, Business Performance, Business Strategies, Certified Salesforce Consultant, Clientele
    Steben Sep 27, 2023
    1,400  Views

    Popular Salesforce Videos

    Deploy Lightning Web Component Files | Salesforce Lightning Tutorial

    Deploy Lightning Web Component Files | Salesforce Lightning Tutorial

    Video in Lightning, Salesforce Training

    Learning Objectives After watching this video, you’ll be able to: Configure Lightning web component files for display in an org. Deploy your files to an…

    Salesforce Training, Salesforce Lightning, Salesforce Lightning Tutorial, Salesforce Video, LWC
    Abhishek Jun 14, 2021
    1,927  Views
    Apex Classes and Apex Triggers in Salesforce

    Apex Classes and Apex Triggers in Salesforce

    Video in Salesforce Development

    In this video, Salesforce developer Artem will demonstrate real-world applications of both Apex classes and triggers with practical business scenarios. Apex classes and Apex triggers…

    Salesforce Tutorial, Apex Class, salesforce, Apex, Salesforce Apex Class
    ENWAY Jun 26, 2024
    699  Views
    Time-based Workflow Rules In Salesforce | Salesforce Tutorial

    Time-based Workflow Rules In Salesforce | Salesforce Tutorial

    Video in Salesforce Training

    Learn all about time-based workflow rules in Salesforce. This tutorial will cover the following points - 1. Create A Workflow Rule Learn how a workflow…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Algoworks Feb 11, 2021
    3,481  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.