Introduction
ROW_NUMBER helps you give a unique number to each row in a group or whole table. It makes it easy to order and pick rows.
You want to number rows in a list, like ranking players by score.
You need to pick the top N items per category, like top 3 salespeople per region.
You want to remove duplicates but keep the first entry.
You want to create a sequence number for rows in a report.