SQL API GROUP BY
The GROUP BY clause divides the query's results according to the values of one or more specified properties. This operation is partially done server-side because of some API limitations. We still need to operate a client-side grouping.
GROUP BY Examples
SELECT COUNT(*) AS CNT, gender FROM [users] GROUP BY gender SELECT COUNT(*) AS CNT, gender, doc_type FROM [users] GROUP BY gender, doc_type