ODBC Driver for Azure Cosmos DB

Build 24.0.9060

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

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060