Added distinct values aggregation