Loading...

Running Tab

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium

Problem

Finance wants to see how each customer's spending accumulates over time. For every row in transactions, compute a per-user running sum of total_amount ordered by transaction_date. Return the user_id, transaction_date, total_amount, and the cumulative spending through that row.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.