Skip to main content

Group Results by Property Values  

GROUP_BY organizes query results into groups based on one or more property values, returning count summaries for each unique combination.
Returns count summaries:
GROUP_BY returns only the count summaries for each unique combination of the specified properties. This is ideal for analytics, distribution analysis, and understanding data patterns without returning full objects.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Example 1: Group users by country

Here’s how to run the query using the SDKs or curl

Example 2: Group users by multiple properties (country and city)

Here’s how to run the query using the SDKs or curl

Example 3: Count users per country using COUNT with GROUP_BY

Here’s how to run the query using the SDKs or curl

Aggregations

Aggregate results with full data objects

Grouping Guide

When to use GROUP_BY vs AGGREGATE_BY

COUNT Operation

Count operation and other result operations

Property Access

Property filtering and access patterns