Type Alias: ActivityGroupBy
ActivityGroupBy = typeof
ActivityGroupBy[keyof typeofActivityGroupBy]
Defined in: packages/sdk/src/types/generated/activity_feed.ts:405
What an aggregate line is a line of.
WORKSPACE and EVENT_TYPE are columns on the rollup, so neither
costs a join — the activities database has no tenancy table to join against
anyway. FAMILY is a pure function of the event_type column
(:func:lib.activity.families.family_of), so it is arithmetic over the
same rows in the same pass, exactly like every other view above the one
materialized grain.
WORKSPACE_FAMILY is the only two-axis grouping, and it exists because
the surface's front door needs both halves of one sentence: "Study A — 8
member changes · 3 conversations". Naming a workspace without saying what
happened in it is the reading that was rejected; saying what happened
without naming the workspace is unusable at org scope, where a row belongs
to one of many clinics. One axis cannot say both, and asking twice and
joining client-side would put a second aggregation — with its own
pagination — in the browser.
It is deliberately the only composite. A general n-axis grouping would need a general keyset over an n-tuple and a general drill ladder, for a second combination nobody has asked for.