SQL - Advanced Query Patterns
What will be the result of this query on table
orders with columns order_id and price if order_id values are not unique?SELECT o1.order_id, o1.price, (SELECT SUM(o2.price) FROM orders o2 WHERE o2.order_id <= o1.order_id) AS running_total FROM orders o1 ORDER BY o1.order_id;