generate_series: Reports Without Missing Days
Lessons in this course
- Joins in PostgreSQL: USING, Aliases and a First ReportFree
- LEFT JOIN, COALESCE and the FILTER Clause Locked
- DISTINCT ON: The Latest Row per Group Locked
- LATERAL Joins: Top N Rows per Group Locked
- CTEs: Building a Report in Readable Steps Locked
- WITH RECURSIVE: Walking a Category Tree Locked
- generate_series: Reports Without Missing Days Locked
- Arrays: @>, && and ANY Locked
- unnest, array_agg and the Double-Counting Trap Locked
- JSONB: ->, ->>, ? and @> Locked
- JSONB Arrays to Rows: jsonb_to_recordset Locked
- GIN Indexes and Selectivity for JSONB and Arrays Locked
- Window Functions: ROW_NUMBER, RANK, DENSE_RANK Locked
- Running Totals and Window Frames: RANGE vs ROWS Locked
- LAG and LEAD: Month-over-Month Change Locked
- Shares and Top N per Group with Window Aggregates Locked
- Views: Saved Queries That Are Always Current Locked
- Materialized Views: Fast but Stale Locked
- UPSERT with INSERT ... ON CONFLICT Locked
- Final Project: A Customer Report in One Query Locked