Date, Time and Time Series: practice questions
400 questions in four levels, all on RetailMart, the practice database of this course. Write every query yourself, get it wrong, read the error, fix it. That is how it sticks.
Answers are coming soon. Post your query in the WhatsApp Community or Discord and we will check it together.
Easy 100 questions Medium 100 questions Hard 100 questions Crazy 100 questions
Core syntax, applied directly
CONCEPTUAL Q1 What does DATE_TRUNC('month', d) do? Q2 What does EXTRACT(YEAR FROM d) return? Q3 Difference between a DATE and a TIMESTAMP in PostgreSQL. Q4 Why are order_date / delivered_date stored as DATE (no time) in RetailMart? Q5 What does date - date return (and in what unit)? Q6 What does date + integer return? Q7 What does an INTERVAL represent, e.g. INTERVAL '7 days'? Q8 What does generate_series(a, b, step) produce? Q9 How does generate_series build a date dimension (one row per day)? Q10 What is "gap-filling" and why LEFT JOIN a generated date series? Q11 What does to_char(d, 'YYYY-MM') produce? Q12 What does EXTRACT(DOW FROM d) return (which day is 0)? Q13 Difference between DOW and ISODOW. Q14 What is an ISO week, and why can it cross a calendar-year boundary? Q15 What weekday does date_trunc('week', d) anchor to? Q16 How do you get the first day of a date's month? Q17 How do you get the last day of a date's month? Q18 What does age(d1, d2) compute vs plain d1 - d2? Q19 What do now() and current_date return? Q20 What does AT TIME ZONE do to a timestamp? Q21 Why do hour-of-day analyses need a TIMESTAMP, not a DATE column? Q22 Which RetailMart columns carry real time-of-day (name three)? Q23 What is a fiscal quarter, and how can it differ from a calendar quarter? Q24 How do you bucket timestamps into 15-minute slots (concept)? Q25 What does make_date(y, m, d) build? TRUNC / EXTRACT / FORMAT Q26 Orders grouped by month (date_trunc) with counts. Q27 Orders grouped by year with counts. Q28 Revenue per calendar quarter (date_trunc('quarter', order_date)). Q29 Order count per day-of-week name (to_char). Q30 Order count per month name (to_char 'Month'). Q31 Year and month as two separate columns from order_date. Q32 Revenue per week (date_trunc('week')). Q33 Count of customers registered per year. Q34 Page_view count per hour-of-day (EXTRACT HOUR from view_timestamp). Q35 Calls per hour-of-day (call_start_time). Q36 Tickets opened per month (created_date). Q37 Orders per quarter for 2025 only. Q38 Average net_total per month for 2025. Q39 Revenue by 'YYYY-MM' label (to_char). Q40 Orders on weekends vs weekdays (DOW filter). Q41 Order count per ISO week of 2025 (to_char 'IYYY-IW'). Q42 Earliest and latest order_date in the data. Q43 Delivery days per order (delivered_date - order_date). Q44 Orders delivered in 0-2 days vs 3+ days (date-diff buckets). Q45 Month name of each customer's registration. Q46 Revenue per half-year (H1/H2) using EXTRACT(month). Q47 Count of reviews per month. Q48 Ad spend per month per platform. Q49 Parse pay-slip period: to_date(salary_month||' '||salary_year,'FMMonth YYYY'). Q50 Orders per day-of-month (1..31) distribution. GENERATE_SERIES & GAP-FILLING Q51 Generate one row per day for January 2025. Q52 Generate one row per month for all of 2025. Q53 Generate a 2025 date spine with date, dow name, week_num, month_name. Q54 Daily order counts for Jan 2025, zero on days with no orders (gap-fill). Q55 Daily revenue for one month with zeros on missing days. Q56 Monthly revenue for 2025 with zeros for months that had none. Q57 Generate the last 90 days ending at max(order_date). Q58 Complete daily revenue for the last 90 days (one row per day, zero when none). Q59 Weekly order counts for 2025 with missing weeks shown as zero. Q60 Generate hours 0..23 and LEFT JOIN page_view counts (zero-fill hours). Q61 Generate every Monday in 2025. Q62 Build the 2025 quarter-start dates. Q63 Generate a date spine with a fiscal_quarter column (April-start concept). Q64 Gap-fill a sparse weekly metric (a week with no rows shows 0). Q65 Daily new-customer counts with zero-filled days. Q66 Per store: daily order counts gap-filled for one month. Q67 Generate the 12 month-start dates of 2025. Q68 LEFT JOIN a date series to returns for daily refund totals (zero-filled). Q69 Generate 15-minute slots across one day (interval '15 min'). Q70 Generate week numbers 1..52 for labelling. Q71 Calendar of 2025 with an is_weekend flag. Q72 Day series marking Indian weekends (Sat/Sun). Q73 Per day in the last 30: distinct customers ordering (zero-filled). Q74 Build a "first 30 days" date series from one customer's registration. Q75 Daily cumulative registrations across 2025 (series + running sum, Topic 17). INTERVALS, TIMEZONES & BUCKETS Q76 Add 7 days to each order_date (order_date + INTERVAL '7 days'). Q77 Orders placed in the last 30 days of the data window. Q78 Customers registered more than 365 days before their first order. Q79 Convert view_timestamp from UTC to IST (AT TIME ZONE). Q80 Hour-of-day distribution of page_views in IST. Q81 Peak shopping hour from page_views (IST) - top hour by count. Q82 Count calls in each hour-of-day (call_start_time). Q83 15-minute bucket of page_views to find the busiest slot. Q84 Time-to-resolution in hours for tickets (resolved_date - created_date). Q85 Tickets resolved within 24 hours vs longer. Q86 Orders shipped within 1 day of order (shipped_date - order_date <= 1). Q87 Average delivery interval per region in days. Q88 Morning/afternoon/evening buckets of page_views (needs a timestamp). Q89 Days since last order for each customer (current_date - max order_date). Q90 Customer tenure in years (age(current_date, registration_date)). Q91 Revenue per ISO week with correct year-week boundary (to_char 'IYYY-IW'). Q92 Orders per fiscal quarter (fiscal year starting April). Q93 Month-over-month revenue growth (date_trunc + LAG, Topic 18). Q94 Rolling 7-day order count over a daily series (window frame, Topic 17). Q95 First and last activity date per customer (orders + page_views). Q96 Events per weekday x hour heatmap (page_views). Q97 Median order value per month (Topic 22 percentile + date_trunc). Q98 Latest order per customer with days-since (DISTINCT ON, Topic 22 + date diff). Q99 Daily revenue gap-filled for 90 days with a 7-day moving average (Topic 17). Q100 Executive time-series strip: monthly orders, revenue, and MoM % for 2025. Combined ideas, multi-step thinking
CONCEPTUAL Q1 Why prefer date_trunc over to_char for grouping (returns a date, sorts right)? Q2 Pitfall of grouping by to_char(d,'Month') (alphabetical sort) - and the fix. Q3 Why gap-fill with a generated calendar instead of trusting present rows? Q4 LEFT JOIN calendar -> fact: which side drives, and why COALESCE(...,0)? Q5 ISO week vs calendar week - when the year-week label matters. Q6 Why can EXTRACT(week) differ from to_char('IW') at year boundaries? Q7 Fiscal year: shifting months by an offset to start in April. Q8 Timezone: storing UTC, displaying IST - the two AT TIME ZONE steps explained. Q9 Difference: ts AT TIME ZONE 'UTC' vs ts AT TIME ZONE 'Asia/Kolkata'. Q10 Why DATE columns cannot answer "peak hour" questions. Q11 Interval ambiguity: INTERVAL '1 month' vs '30 days'. Q12 generate_series with timestamps and an interval step. Q13 Building arbitrary-width buckets (15-min, 4-hour) via epoch math. Q14 Why a date-dimension table speeds up repeated reporting (Topic 20 indexing). Q15 One calendar spine, many facts: the multi-LEFT-JOIN pattern. Q16 Detecting activity gaps/islands (consecutive-day runs) - the idea. Q17 Rolling windows: RANGE vs ROWS frames over time (Topic 17). Q18 Why a 7-day moving average needs a gap-filled daily series first. Q19 Cohort timelines: how to anchor "day 0" per customer. Q20 Computing "days since previous order" with LAG (Topic 18). Q21 Month boundaries: date_trunc('month') + interval to reach month-end. Q22 Handling DST / ambiguous local times (concept; note IST has no DST). Q23 Why age() can surprise across months of different lengths. Q24 Controlling the week anchor: ISO Monday-start vs Sunday-start. Q25 When to precompute a time-series in a materialized view (Topic 25 preview). BUCKETING & AGGREGATION Q26 Monthly revenue, order count, and AOV for 2025. Q27 Quarterly revenue per region (date_trunc + join). Q28 Weekly order counts per store (ISO week). Q29 Day-of-week x store revenue matrix (pivot, Topic 21). Q30 Hour-of-day page_view counts per device type. Q31 Monthly new vs returning customer counts. Q32 Revenue per fiscal quarter (April-start fiscal year). Q33 Month-name-labelled revenue ordered by month number. Q34 Orders per ISO week handling the 2025-12 / 2026-01 boundary correctly. Q35 Per region: monthly revenue for 2025 as a tidy long table. Q36 Average delivery days per month (trend). Q37 Tickets opened per weekday x priority (pivot). Q38 Per hour-of-day: call volume and median call duration (Topic 22). Q39 Registrations per month with a cumulative running total (Topic 17). Q40 Daily revenue with a 7-day moving average (gap-filled series + window). Q41 Monthly refund totals and refund rate. Q42 Page_views per 15-minute slot; busiest 10 slots. Q43 Revenue by half-year per region. Q44 Orders per month split into weekday vs weekend (FILTER, Topic 21). Q45 Per category: monthly units sold for 2025 (pivot by month). Q46 Average basket size per quarter. Q47 Median order value per month per region (Topic 22). Q48 Ad spend vs revenue per month (two facts on one month spine). Q49 Seasonality: average revenue per calendar month across all years. Q50 Year-over-year monthly revenue (same month, prior year) with LAG. GENERATE_SERIES, SPINES & GAP-FILL Q51 Build a 2024-2026 daily spine with dow, iso_week, month, quarter, is_weekend. Q52 Complete daily revenue for the last 90 days (zero-filled) - the lab. Q53 Per store: complete daily order counts for one month (spine x stores, zero-fill). Q54 Weekly revenue for 2025, every ISO week present even if zero. Q55 Monthly revenue per region with every region x month present (cross join). Q56 Hour-of-day spine (0..23) x device, zero-filled page_view counts. Q57 Gap-fill a sparse weekly metric and compute WoW change (LAG). Q58 First-30-days cohort timeline per customer (registration + series 0..29). Q59 Daily active customers for 90 days (zero-filled) with 7-day moving avg. Q60 Calendar spine joined to orders AND returns AND payments (multi-fact). Q61 Generate a quarter spine 2024-2026 and LEFT JOIN revenue. Q62 New-customer daily series with a cumulative running total. Q63 15-minute spine across a day; join page_views; find the peak slot per device. Q64 Per region daily revenue spine for a month; flag zero-revenue days. Q65 Monthly spine with revenue and zero-safe MoM growth %. Q66 Build a fiscal-calendar spine (fiscal_year, fiscal_quarter) 2024-2026. Q67 Cohort retention spine: months-since-registration 0..11 per cohort. Q68 Generate week-start dates for 2025 and bucket orders into them. Q69 Daily refund totals zero-filled with a 14-day moving average. Q70 Detect days with zero orders per store (via spine anti-join). Q71 Per customer: a 12-month activity timeline from their first order. Q72 Build an hour x weekday heatmap spine and fill page_view counts. Q73 Generate a 2020-2030 date dimension with fiscal_quarter and week_num. Q74 Calendar spine to compute "active days in month" per store. Q75 Gap-and-island: longest run of consecutive days a store had orders. TIMEZONES, INTERVALS & TIME-SERIES Q76 Convert all page_view timestamps to IST and bucket by hour. Q77 Peak shopping hour overall and per device (IST). Q78 Calls per IST hour with median duration per hour (Topic 22). Q79 Time-to-ship and time-to-deliver intervals per order, averaged per region. Q80 % of orders delivered within SLA (<=3 days) per month. Q81 % of tickets resolved within 24h per priority per month. Q82 Customer tenure buckets (age) cross-tabbed with tier. Q83 Days-between-orders per customer (LAG) and its monthly trend. Q84 MoM and YoY revenue growth per region (two LAGs). Q85 Rolling 28-day revenue per region (window RANGE frame). Q86 Inter-arrival time of page_views per session (LAG on timestamp). Q87 Median delivery interval per region per quarter (Topic 22 + date). Q88 Revenue per ISO week with year-week label, correct across 2025/2026. Q89 Busiest 15-minute window of the week (weekday x slot). Q90 First-purchase latency: days from registration to first order, distribution. Q91 Monthly cohort sizes and their month-1 retention. Q92 Hour-of-day revenue proxy via page_views->orders timing (concept + join). Q93 Time-bucketed funnel: events per stage per hour (web_events). Q94 Daily revenue anomalies: days beyond P95 of the daily distribution (Topic 22). Q95 Seasonal index: each month's revenue / its yearly average. Q96 Latest activity timestamp per customer across orders + views (GREATEST/DISTINCT ON). Q97 Rolling 7-day active-customer count (gap-filled + window). Q98 Month-end vs month-start revenue (date_trunc boundaries). Q99 Per region monthly revenue pivot (region x month) with MoM in cells. Q100 Exec time-series dashboard: monthly orders, revenue, AOV, MoM%, YoY% for 2025. Interview grade, edge cases
CONCEPTUAL Q1 Designing a reusable date-dimension table: columns, grain, indexing (Topic 20). Q2 Calendar spine via generate_series vs recursive generation - why the spine wins. Q3 Gap-and-island detection: the row_number-difference trick (Topic 16). Q4 RANGE vs ROWS time frames and their effect on moving aggregates (Topic 17). Q5 Correct ISO-week-year reporting across the Dec/Jan boundary. Q6 Fiscal calendar: generating fiscal_year/quarter/period with a month offset. Q7 Timezone correctness: UTC storage, multi-zone reporting, DST awareness. Q8 Why "peak hour" needs timestamp columns, and which RetailMart sources qualify. Q9 Building N-minute buckets via epoch floor - the generalized formula. Q10 Cohort analysis foundations: anchor date, period index, triangle shape (Topic 27 preview). Q11 Moving average over a sparse series - why gap-fill must come first. Q12 Computing MoM / YoY safely with LAG over a complete spine. Q13 Missing-period growth %: zero vs NULL semantics. Q14 Detecting activity streaks (consecutive days) and breaks. Q15 Indexing a timestamp column for range-scan dashboards (Days 19-20). Q16 Why date_trunc on an indexed column can prevent index use - expression-index fix. Q17 Sessionization: splitting events into sessions by inactivity gap (LAG). Q18 Time-weighted metrics (e.g. average inventory over time) - the concept. Q19 Calendar-heatmap data shape (weekday x hour) and how to build it. Q20 Backfilling a daily metric idempotently (Topic 25/26 preview). Q21 Median vs mean for delivery-time SLAs over time (Topic 22 tie-in). Q22 Choosing the spine grain (day/week/month) for a given report. Q23 Pitfalls of EXTRACT(epoch) for interval lengths across DST. Q24 Why a materialized daily-revenue table helps dashboards (Topic 25 preview). Q25 Designing an "as-of" join against a date spine (point-in-time state). TIME-SERIES REPORTS Q26 Complete daily revenue last 90 days + 7-day and 28-day moving averages. Q27 Per region monthly revenue with MoM% and YoY% (complete spine). Q28 Gap-and-island: longest consecutive-day ordering streak per store. Q29 Sessionize page_views (30-min inactivity) and count sessions per customer. Q30 Daily active customers with 7-day moving average and WoW% (gap-filled). Q31 ISO-weekly revenue 2024-2026 with correct boundaries, ranked weeks. Q32 Fiscal-quarter revenue per region (April start) with QoQ growth. Q33 Hour x weekday revenue-proxy heatmap from page_views (busiest cells). Q34 Rolling 28-day retention: active in window / base (window RANGE). Q35 Median + P95 delivery days per month (Topic 22) - trend. Q36 New vs returning revenue split per month (first-order flag). Q37 Cohort triangle: monthly cohorts x months-since for order counts. Q38 Peak 15-minute slot per weekday with order/view counts. Q39 Daily revenue anomalies beyond P95 of the daily distribution (Topic 22). Q40 Seasonal-lite: month index vs trailing-12-month average. Q41 Time-to-first-order distribution per registration cohort (median, P90). Q42 Inter-order gap distribution per tier (LAG + percentile). Q43 Refund rate per ISO week with a 4-week moving average. Q44 Ticket SLA attainment per priority per month (resolved within target). Q45 Month-end inventory snapshot value per warehouse over time (latest in month). Q46 Revenue contribution by hour-of-day (IST) as % of daily total. Q47 YoY same-week comparison (ISO week) per region. Q48 Active-days-per-month per customer and its trend. Q49 Complete store x month revenue matrix (zero-filled) + row/col totals. Q50 Detect "dormant then reactivated" customers (gap > 90 days then ordered). CALENDAR DIMENSIONS & GAP-FILL ENGINES Q51 Build a 2020-2030 date dimension: date, dow, iso_dow, week, iso_week, month, month_name, quarter, fiscal_year, fiscal_quarter, is_weekend, is_month_end. Q52 Use the dimension to gap-fill daily revenue across all stores. Q53 Cross-join spine x regions to guarantee complete region x month revenue. Q54 Cohort spine (cohort_month x period_index 0..11) joined to order facts. Q55 Fiscal-period spine and revenue per fiscal period with QoQ. Q56 Hour-of-day x device spine, zero-filled, with median duration per cell (Topic 22). Q57 15-minute spine for one week; join page_views; rank slots. Q58 As-of join: for each month-end, the latest inventory snapshot per SKU (Topic 22 DISTINCT ON). Q59 Daily spine with multiple facts (orders, returns, payments) in one wide row. Q60 Week spine 2024-2026 with WoW and 4-week moving avg for revenue. Q61 Gap-fill + carry-forward last known value (LOCF) for a sparse metric (window). Q62 Business-day calendar (exclude weekends) and count business days to deliver. Q63 Month spine with seasonal index (month / annual mean). Q64 Streaks: classify each customer's longest active streak via gap-and-island. Q65 Reactivation spine: months-since-last-order per customer per month. Q66 Calendar heatmap dataset: weekday x hour counts for page_views. Q67 Per store: complete daily series + flag zero-revenue and record-high days. Q68 Fiscal-year-to-date cumulative revenue per region (running sum, Topic 17). Q69 Rolling 12-month revenue (trailing window) per region. Q70 Date spine to compute customer "age at order" cohorts. Q71 As-of price: most-recent selling price per product at each month-end (Topic 22). Q72 Spine-driven SLA: % delivered within 3 days per day, 30-day moving average. Q73 Detect missing daily snapshots per warehouse (expected vs present). Q74 First/last activity per customer from a unified event spine. Q75 Reusable "last 90 days" parameterized spine with three KPIs on it. PRODUCTION TIME-SERIES SYSTEMS Q76 Daily revenue dashboard: 90-day complete series, 7/28-day MA, MoM%, anomalies (P95). Q77 Cohort retention matrix (monthly cohorts x 12 periods) with retention %. Q78 Region growth board: monthly revenue, MoM%, YoY%, rolling-12m, rank. Q79 Delivery SLA monitor: median/P95 delivery days per month + breach % + trend. Q80 Sessionization pipeline: sessions per customer, median session length, bounce proxy. Q81 Peak-hour ops report: busiest 15-min slots per weekday with a staffing hint. Q82 Support SLA time-series: resolution median/P95 per priority per month + attainment. Q83 Reactivation funnel: dormant (>90d) -> reactivated counts per month. Q84 Seasonal index report per category (month / annual mean) for planning. Q85 Fiscal dashboard: FYTD revenue, QoQ, vs prior-FY same period, per region. Q86 Inventory-over-time: month-end value per warehouse + days-of-cover trend. Q87 New vs returning revenue time-series with contribution % per month. Q88 Anomaly detector: daily revenue beyond regional P95/P99 (Topic 22) flagged. Q89 Heatmap export: weekday x hour activity, normalized per row. Q90 Pricing time-series: per product as-of monthly price + drift flags. Q91 Customer lifecycle timeline: registration -> first order -> latest order spans. Q92 Rolling retention: 28-day active / 28-day-prior base, per region trend. Q93 Time-to-deliver funnel by stage (order->ship->deliver) median per month. Q94 Year-week revenue with correct ISO boundaries + YoY same-week. Q95 Complete store x month revenue matrix with totals + zero-day diagnostics. Q96 "Morning report": yesterday vs trailing-28-day median per region (as-of). Q97 Cohort LTV-over-time: cumulative revenue per cohort by month-since. Q98 Multi-fact daily spine mart (orders/returns/payments/views) for BI. Q99 Streak & churn board: active streaks, dormancy, reactivation per customer. Q100 Capstone: a parameterized daily time-series mart (complete spine, MAs, MoM/YoY, anomalies) as one query. Production scenarios, optimisation
CONCEPTUAL Q1 Architect a date-dimension + fact-spine layer for a warehouse (grain, keys, indexing). Q2 Calendar dimension vs on-the-fly generate_series - tradeoffs at scale. Q3 Incremental daily-metric materialization with idempotent backfill (Topic 25/26). Q4 As-of / point-in-time joins against a spine - the generalized pattern. Q5 Sessionization at scale: gap-based splitting, session keys, performance (Topic 19). Q6 Gap-and-island internals: row_number-difference vs LAG-based boundary. Q7 LOCF (last-observation-carried-forward) over sparse series via window. Q8 Time-weighted averages (e.g. inventory) - integrating over a step function. Q9 Multi-timezone reporting: store UTC, present per-region local - design. Q10 DST-safe interval math and why raw epoch differences can mislead. Q11 Rolling-window performance: RANGE frames, ordering, memory (Days 17/19). Q12 ISO-year/week correctness and the off-by-one at year boundaries. Q13 Fiscal calendars (4-4-5, April-start) - generating periods programmatically. Q14 Cohort/retention triangle construction and storage shape (Topic 27). Q15 Anomaly detection: percentile bands vs moving z-score (Topic 22). Q16 Choosing spine grain + pre-aggregation tiers (day->week->month rollups). Q17 Backfill vs streaming append for a metrics table - consistency concerns. Q18 Handling late-arriving facts in a daily mart (idempotent upsert concept). Q19 Heatmap normalization choices (per-row, per-col, global) and their meaning. Q20 MV vs summary table vs live query for time-series (Topic 25) - trade-offs. Q21 Indexing strategy for time-range dashboards: BRIN vs btree (Topic 20). Q22 Why date_trunc in WHERE defeats indexes; the expression-index remedy. Q23 Designing reusable parameterized spines (last-N-days, fiscal-YTD). Q24 Reconciling rollups (daily sum vs monthly aggregate) - consistency checks. Q25 SLA metric design over time: median/P95 windows and breach accounting. TIME-SERIES & DISTRIBUTION ENGINES Q26 Daily-revenue engine: 90-day spine, 7/28-day MA, MoM%, P95 anomaly flag, rank. Q27 Cohort retention triangle (monthly cohorts x period 0..N) with %, complete spine. Q28 Region growth engine: monthly revenue, MoM%, YoY%, rolling-12m, QoQ, rank - one query. Q29 Sessionization engine: sessions per customer, count, median/P95 length, inter-event gaps. Q30 Delivery-SLA time-series: median/P95 delivery days per region per month + breach % + trend. Q31 Reactivation engine: dormancy (>90d) detection, reactivation per month, win-back %. Q32 Seasonal-index engine per category (month / trailing-12m mean) as a forecast input. Q33 Peak-load engine: busiest 15-min slots per weekday with median duration (Topic 22). Q34 Anomaly engine: daily revenue beyond regional P95/P99 with context + streaks. Q35 Fiscal engine: FYTD, QoQ, vs prior-FY same period, per region, fiscal-April. Q36 As-of inventory engine: month-end latest snapshot per SKU + value + days-of-cover trend. Q37 Streak & islands engine: per customer longest active streak + dormancy spells. Q38 LOCF pricing engine: as-of monthly selling price per product, carry-forward gaps. Q39 New/returning/reactivated revenue decomposition per month (three-way split). Q40 Rolling-retention engine: 28-day active / prior 28-day base per region trend. Q41 Heatmap engine: weekday x hour activity normalized, per device, with peak labels. Q42 Time-to-deliver funnel engine: order->ship->deliver median/P95 per month per region. Q43 ISO-week revenue engine 2024-2026 + YoY same-week + 4-week MA, boundary-correct. Q44 Multi-fact daily mart: orders/returns/payments/views per day, gap-filled, one wide row. Q45 Inter-order cadence engine: per customer median gap, distribution, cadence segments. Q46 YoY decomposition: volume vs price vs mix contribution per month. Q47 SLA-attainment engine per priority per month with target = prior-quarter P90 (Topic 22). Q48 Customer-lifecycle engine: registration->first->latest spans + lifecycle stage per month. Q49 Trailing-12-month LTV-by-cohort engine (cumulative revenue per period-since). Q50 Reconciliation engine: daily-sum vs monthly-aggregate revenue per region (consistency). CALENDAR/SPINE & AS-OF PIPELINES Q51 Full 2018-2030 date dimension (calendar + fiscal + iso + flags) as a reusable spine. Q52 Complete store x day revenue mart (cross-join spine) with zero-day diagnostics. Q53 As-of join engine: for every month-end, latest inventory snapshot per SKU (Topic 22). Q54 Cohort spine (cohort_month x period 0..23) joined to orders -> retention + LTV. Q55 Business-day calendar (exclude weekends) -> business-days-to-deliver SLA. Q56 LOCF carry-forward over a sparse daily metric per store (window LOCF). Q57 Multi-grain rollup spine: day->week->month revenue with reconciliation (GROUPING SETS). Q58 Sessionization spine: assign session ids by 30-min gap, then per-session metrics. Q59 Fiscal-period spine (4-4-5 or April-start) + revenue per period + QoQ. Q60 Heatmap spine weekday x hour, zero-filled, median duration per cell (Topic 22). Q61 Reactivation spine: months-since-last-order per customer per month + state labels. Q62 As-of price book: most-recent selling price per product at each month-end + drift. Q63 Trailing-window spine: rolling 12-month revenue per region (RANGE frame). Q64 Customer "age at order" cohorts via spine + registration join. Q65 Snapshot-completeness checker: expected vs present daily snapshots per warehouse. Q66 Unified activity spine: latest of orders/views/tickets/calls per customer per month. Q67 Streak classifier via gap-and-island over a complete daily spine. Q68 FYTD cumulative revenue per region (running sum on a fiscal spine). Q69 Parameterized "last N days" spine factory + three pluggable KPIs. Q70 As-of tier: customer's tier as-of each month-end (DISTINCT ON tier_updated_at, Topic 22). Q71 Time-weighted average inventory per warehouse per month (step-function integral). Q72 Spine-driven SLA: % delivered within 3 days per day + 30-day MA + breach streaks. Q73 Late-arrival-tolerant daily mart (idempotent rebuild for a date range). Q74 Heatmap normalization variants (row/col/global) from one spine dataset. Q75 Reusable cohort-triangle builder parameterized by metric (orders/revenue/active). PRODUCTION ANALYTICS SYSTEMS Q76 CXO daily mart: 90-day spine, revenue, 7/28-day MA, MoM%, YoY%, P95 anomalies, rank. Q77 Cohort retention + LTV dashboard: triangle %, cumulative revenue, latest cohort, decile. Q78 Region growth command center: monthly revenue, MoM/YoY/QoQ, rolling-12m, rank, anomaly flag. Q79 Delivery-SLA monitor: per region/month median/P95 delivery, breach %, streaks, target = prior-Q P90. Q80 Sessionization + funnel: sessions, stage timings, median/P95 per stage, drop-off per hour. Q81 Reactivation & churn system: dormancy detection, win-back per month, lifecycle stages. Q82 Seasonal planning pack: per category seasonal index, trailing-12m, next-period hint. Q83 Peak-load staffing report: busiest 15-min slots weekdayxhour + median handle time (calls). Q84 Anomaly digest: daily revenue beyond regional P95/P99 with drill-down + recent streak. Q85 Fiscal exec dashboard: FYTD, QoQ, prior-FY comparison per region, fiscal-April. Q86 Inventory time-series board: month-end value, days-of-cover trend, stockout streaks. Q87 Revenue decomposition system: new/returning/reactivated contribution per month per region. Q88 Rolling-retention board: 28-day active/base per region + trend + alerts. Q89 Delivery-funnel SLA: order->ship->deliver median/P95 per stage per month, end-to-end P95. Q90 ISO-week YoY board: same-week revenue YoY per region, boundary-correct, ranked movers. Q91 Heatmap product: weekdayxhour normalized activity per device for UX/ops. Q92 Pricing drift monitor: as-of monthly price per product + corridor + drift alerts (Topic 22). Q93 Customer lifecycle mart: per customer stage timeline + as-of tier + recency decile. Q94 Reconciliation suite: daily vs monthly vs fiscal rollups consistency per region. Q95 Multi-fact BI mart: per day per region orders/returns/payments/views, gap-filled, wide. Q96 "Morning report" engine: yesterday vs trailing-28-day median per region (as-of) + flags. Q97 Time-weighted inventory + turnover per warehouse per month. Q98 Parameterized time-series mart factory (grain + metric + window pluggable). Q99 End-to-end metrics pipeline: spine -> facts -> MAs -> MoM/YoY -> anomalies -> ranks, one query. Q100 Capstone: the production daily/region time-series mart (complete spine, MAs, MoM/YoY/QoQ, P95 anomalies, SLA%, rank), noting where an MV (Topic 25) would replace live compute.