Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
SELECT city.city_id, city.city, COUNT(customer.customer_id) AS customer_count FROM customer JOIN address ON customer.address_id = address.address_id JOIN city ON address.city_id = city.city_id GROUP BY city.city_id, city.city ORDER BY customer_count DESC LIMIT 1;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear