select "customers".country AS "customers_country", SUM("orderfact".totalprice) AS "orderfact_totalprice" from customers "customers", orderfact "orderfact", timeline "timeline" where "orderfact".customernumber="customers".customernumber AND "orderfact".time_id="timeline".id AND LEFT("timeline".id,7)='2016-07' group by "customers".country order by "customers_country", "orderfact_totalprice"