Choose a query shape that joins the right entities, filters source rows first, then aggregates at the requested grain.
The support lead needs breached tickets by channel before the standup. Which query shape should Rina use for a reliable SLA-by-channel number? Start from ticket-level SLA facts, join channel names, filter to yesterday's eligible tickets in WHERE, then GROUP BY channel. Right. The source rows match the entity being counted, the row filter defines the evidence before aggregation, and GROUP BY creates one output row per channel. Join tickets to all messages first, then count rows by channel because every message proves work happened. Weaker. That violates the grain: message rows can multiply a ticket, so COUNT() would measure ticket-message…
Sign up free: one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in