select "timeline".year_nb AS "timeline_year_nb", "products".productline AS "products_line", SUM("orderfact".totalprice) AS "orderfact_totalprice" from orderfact "orderfact", products "products", timeline "timeline" where "orderfact".productcode="products".productcode AND "orderfact".time_id="timeline".id group by "timeline".year_nb, "products".productline order by "timeline_year_nb", "products_line", "orderfact_totalprice"