Databases Deep Dive / Stage 4 · Expressing and scaling queries

Compose CTEs, windows, views, functions and triggers

CoreAdvancedDraft, not yet reviewed12 min of activities

"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

My notes

Saved on this device, synced when signed in
Esc
↑ ↓ to move↵ to open