Aggregate: Count Distinct

By Carlos Henriques on 9 Mar 2015
The count operation just does COUNT(COLUMN).
In some situations we need to do a count distinct like COUNT(DISTINCT COLUMN).

With this limitation Advanced Query is still the solution to simple operations like a count.
Tiago Lopes10 Apr 2015
Hello,

You can use GROUP BY on COLUMN and then outside the aggregate use:
<AGGREGATA_NAME>..List.Length

The platform will optimze the code in order to get only the Length attribute of the Aggregate instead of load the entire result list.

John Williams6 Dec (2 days ago)

Agreed Count( Distinct would be very useful and eliminate the need for some advanced queries on complex joins or having to do lookup function to perform a count