Try a query

Sample queries

Start with a question about the data, then adapt the SQL for your own database engine.

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 →

Northwind

Products by supplier

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 →