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?
Use Group by
SELECT foo
FROM bar
GROUP BY foo
eg:
SELECT Status
FROM Case
GROUP BY Status
1|New
2|Assigned
3|In Progress
4|In Progress Known Issue