SELECT bl.state,bl.city,COUNT(t.id) transactions,SUM(t.final_total) total_sales FROM business_locations bl JOIN transactions t ON bl.id=t.location_id WHERE t.type="sell" AND t.status="final" GROUP BY bl.state,bl.city ORDER BY total_sales DESC;