JOINS
a. List the top 5 countries (by order count) that Classic Models ships to. (Use the Customers and Orders tables)
USE Customers_Orders;
SELECT Customers, COUNT(orderNumber) AS order_count
FROM Customers
JOIN Orders ON customerNumber = o.customer_id
GROUP BY country
ORDER BY order_count DESC
LIMIT 5;
New contributor
Amruta Gawade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.