Skip to Content
SQL Intermediate: Queries That Survive Real Data
Intermediate
0 likes
Courses
SQL Intermediate: Queries That Survive Real Data

Check Yourself: Windows and Dates

Five scenario questions on ranking ties, running totals, date_trunc and time zones. If you miss more than one, reread the lessons in this section.

Course content

Sign in to save your progress.

Course Home
1. Two customers tie for first place with 3 orders each, and the next customer has 2 orders. What do RANK and DENSE_RANK give the next customer?
2. You use ROW_NUMBER to keep the first order of each customer, but two orders have the same date and the ORDER BY uses only the date. What is the risk?
4. You write WHERE row_number() OVER (ORDER BY total) = 1 and PostgreSQL says window functions are not allowed in WHERE. What is the fix?

About

Five scenario questions on ranking ties, running totals, date_trunc and time zones. If you miss more than one, reread the lessons in this section.

Duration
5 min
Last update
10/04/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.