Oct 29: Window Functions
Learning Objectives
After today's class, you should be able to:
- Rank and compare rows using
OVERandPARTITION BY. - Distinguish window functions from aggregate functions.
Lesson Outline
Announcements [5 min]
- GP3: answer your reviews and push follow-up commits before the weekend
- HW5: after today, you can write all 8 queries
Window Functions [25 min]
- Window Functions
OVER,PARTITION BY, ranking,lag, and running totals
Lab [30 min]
- Window Functions on TPC-H
- Problems 1–4 in class; Problem 5 if you have time
HW5 and team time [15 min]
- Work on HW5, or on your team's response to its GP3 review