SQL - Advanced Query Patterns
Identify the error in this query intended to calculate running totals:
SELECT id, amount, (SELECT SUM(amount) FROM sales WHERE id < id) AS running_total FROM sales ORDER BY id;