SELECT * FROM
(SELECT EXTRACT(YEAR FROM order_date) year, order_mode, order_total FROM orders)
PIVOT
(SUM(order_total) FOR order_mode IN ('direct' AS Store, 'online' AS Internet));


---------------------------
SELECT *
FROM (
	SELECT EXTRACT(YEAR FROM order_date) AS year, order_mode, order_total
	FROM orders
)
PIVOT (SUM(order_total) FOR order_mode IN ('direct' AS Store, 'online' AS Internet));
