7 lines
157 B
MySQL
7 lines
157 B
MySQL
|
WITH orders_with_total AS (
|
||
|
SELECT order_id, price + tax AS total
|
||
|
FROM Orders
|
||
|
)
|
||
|
SELECT order_id, SUM(total)
|
||
|
FROM orders_with_total
|
||
|
GROUP BY order_id;
|