DB Quacks SQL Tutorial · Chapter 5

The ROW_NUMBER Awakens

Ninja analyst duck appears silently in dark goggles. Stealth mission! Find the oldest duck in each species group without collapsing groups like GROUP BY. Window functions preserve details while adding ranking magic!

Your task

Show each duck with their rank by age within their species group from the ducks table. You will be using window functions to rank ducks within each species.

Start level 24 →

DuckDB docs for this lesson