Skip to main content
This parameter is distinct from the query view-level default_group_by parameter. The two settings apply at different scopes and serve different purposes.
Controls whether measure-less queries get an implicit GROUP BY. always_having, totals, and pivots will continue to force aggregation regardless of this setting.

Syntax

Properties

string
default:"always"
Controls whether measure-less queries get an implicit GROUP BY. Valid values are:
  • alwaysDefault. Measure-less queries always get an implicit GROUP BY.
  • never — Measure-less queries never get an implicit GROUP BY
  • primary_key — The implicit GROUP BY is dropped only when the full primary key is selected unparameterized and there is no fan-out join. This avoids unnecessary deduplication when the result set is already guaranteed to be unique.
always_having, totals, and pivots will continue to force aggregation regardless of this setting.

Examples

Always group

In this example, measure-less queries always include a GROUP BY, deduplicating rows where all selected dimensions have identical values.

Never group

In this example, measure-less queries will not include an implicit GROUP BY and will potentially return duplicate rows.

Group by primary key

In this example, the implicit GROUP BY is only dropped when the full primary key is selected unparameterized and there is no fan-out join. This avoids unnecessary deduplication when the result set is already guaranteed to be unique.