Skip to main content

Practice ยท 2 of 2

Aggregate by Region

Given table sales(region TEXT, amount INTEGER), implement totals_by_region(conn) returning a dict region โ†’ SUM(amount), sorted by region name (insertion order of the dict).

Difficulty: intermediate

Back to lesson: Practice: SQL Drills