select LEFT("timeline".id,7) AS "timeline_year_month", SUM("orderfact".totalprice) AS "orderfact_totalprice", SUM("orderfact".quantityordered) AS "orderfact_quantityordered" from PUBLIC.orderfact "orderfact", PUBLIC.products "products", PUBLIC.timeline "timeline" where "orderfact".productcode="products".productcode AND "orderfact".time_id="timeline".id AND "products".productline='Classic Cars' AND "timeline".year_nb=2012 group by LEFT("timeline".id,7) order by "timeline_year_month", "orderfact_totalprice", "orderfact_quantityordered"