function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DodiDodi 

Select Distinct

Is there an equivalent of the standard DISTINCT statement for SOQL (SELECT DISTINCT email from Some_Table) like ther eis in standard SQL? There is a DISTINCT COUNT(field).....but I am looking for just DISTINCT so that duplicate values are not returned?

 

Thanks

KunisettyKunisetty

Hard to believe, but the reality is SOQL doesn't support a DISTINCT yet.

 

You can find workarounds to this.

mtbclimbermtbclimber

This might help:

 

[IdeaExchange] Select Distinct Expression in SOQL