----temukan total pembelian terbanyak berdasarkan category tiap tahun with t1 as( select ct.category,sum(quantity) as totalbuy,extract(year from order_date) as datee from orders_table as ot join categories_table as ct on ot.product_id = ct.productid group by 1,3 ) select * from t1 order by datee asc, totalbuy desc;