JOINHAVING

Return customer_name and total spend (as total_spend) across completed orders only. Include only customers whose total spend is above 500. Sort by total_spend descending.

Guest mode · solve history stays on this device; code isn’t saved. Sign in to save future work