Northwind
Orders by country
Count orders by their shipping country.
SELECT ShipCountry, COUNT(*) AS Orders FROM Orders GROUP BY ShipCountry ORDER BY Orders DESC LIMIT 10;Get the database →Try a query
Start with a question about the data, then adapt the SQL for your own database engine.
Northwind
Count orders by their shipping country.
SELECT ShipCountry, COUNT(*) AS Orders FROM Orders GROUP BY ShipCountry ORDER BY Orders DESC LIMIT 10;Get the database →Northwind
List products and their supplier names.
SELECT Products.ProductName, Suppliers.CompanyName FROM Products JOIN Suppliers USING (SupplierID) ORDER BY Suppliers.CompanyName, Products.ProductName LIMIT 20;Get the database →