Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I want to know what all the existing values of a field are.

In SQL that would be something like:

SELECT DISTINCT foo

FROM bar

How might I do this with salesforce's SOQL?

1 Answer

0 votes
by (32.1k points)

Use Group by:

SELECT foo

FROM bar

GROUP BY foo

To learn in-depth about Workflow in Salesforce, sign up for an industry based Salesforce Admin certification.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...