Databases Deep Dive / Stage 4 · Expressing and scaling queries
Compose CTEs, windows, views, functions and triggers
"Already know" meets prerequisites. "Not relevant" removes the topic from your total but leaves what builds on it waiting.
Self-check
- Write a monthly revenue report per customer with a running total and each month's rank, first as one query with a CTE and window functions, then as a view. Prove both return the same rows as a slow baseline query.
- Evidence to include: Keep the baseline, the CTE query and the view, a row-count and checksum comparison of their results, and one sentence on when a trigger would be the wrong tool.
Try it without the material first, then compare. Save your answer in your notes below. Report a problem with this self-check
Learning activities
3 activities- Not done4 min
- Not done4 min
- Not done4 min