Adding Running Totals and Row Numbers with SQL
Build totals and ranks without subqueries or extra joins
Working with data means doing more than just pulling it from a table. Sometimes you need totals that build as you go or numbers that show the order things happened. You’ll see that in reports, charts, and anything that tracks progress over time. You don’t have to write separate queries or chain a bunch of joins to get there. Modern databases…
Keep reading with a 7-day free trial
Subscribe to Alexander Obregon's Substack to keep reading this post and get 7 days of free access to the full post archives.