These are the questions that separate an analyst who writes GROUP BY from one who builds reports. Each one names an output; decide which tool fits:
- smoothing or "the last n": a window frame;
- typical values: median and percentiles;
- one column per value: pivot;
- trees: a recursive CTE;
- every day or week, even empty ones: a date series;
- totals inside the report: ROLLUP.