Get startedGet started for free

Ranking Records with ROW_NUMBER

Harbr's operations team wants to identify which shipments were fastest within each region - specifically, a ranked list of shipments ordered by delivery time, reset for each region. Rather than sorting the full table and losing regional context, you'll use ROW_NUMBER() with PARTITION BY to assign a rank within each region independently. Your task is to rank shipments by delivery_days within each region and identify which shipment ranked first in AMER.

This exercise is part of the course

Data Pipeline Automation in Snowflake

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise