SQL - Advanced Query Patterns
Consider this query intended to calculate a running total:
What is the main issue with this query?
SELECT id, amount, (SELECT SUM(amount) FROM sales WHERE id < s.id) AS running_total FROM sales s ORDER BY id;
What is the main issue with this query?
