select
t1.city city
,sum(t2.total_amount) total_order_amount
from customers t1
join orders t2
on t1.customer_id = t2.customer_id
group by 1
order by 2 desc,1