1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate SQL Server

Connected

Exercise

Assigning row numbers

Records in T-SQL are inherently unordered. Although in certain situations, you may want to assign row numbers for reference. In this exercise, you will do just that.

Instructions

100 XP

Write a T-SQL query that assigns row numbers to all records partitioned by TerritoryName and ordered by OrderDate.