Get Accounts with at least one closed-won opportunity in Salesforce

Reading Time: < 1 minutes

Many companies use Salesforce to manage their business processes. One of the processes that Salesforce can help you with is tracking opportunities. You can use the platform to keep track of which leads or accounts have at least one closed-won opportunity. Knowing which accounts have won an opportunity can help your company target those companies for future sales or marketing efforts.

SELECT Id, Name,BillingCity, BillingState, BillingCountry, CreatedDate
FROM Account
WHERE Id IN (SELECT AccountId FROM Opportunity WHERE IsWon = true)

Photo by Gwen Weustink on Unsplash

About the author

Andrés Canavesi
Andrés Canavesi

Software Engineer with 15+ experience in software development, specialized in Salesforce, Java and Node.js.

Related posts

Leave a Reply

%d bloggers like this: