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

You can use GROUP BY on COLUMN and then outside the aggregate use:

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