Customers in Chicago
Select and filter
List the names of customers who live in Chicago.
Tables (and the sample data)
customers
People who buy from the shop
idinteger: Customer numbernametext: Namecitytext: Cityjoinedtext: Date they joined (YYYY-MM-DD)
Sample rows (8)
| id | name | city | joined |
|---|---|---|---|
| 1 | Ana P. | Lisbon | 2023-02-14 |
| 2 | Ben K. | Chicago | 2022-11-03 |
| 3 | Chloe M. | Toronto | 2024-01-20 |
| 4 | Dev R. | Chicago | 2021-06-30 |
| 5 | Ema S. | Lisbon | 2024-05-02 |
| 6 | Femi O. | Lagos | 2023-09-12 |
| 7 | Gus T. | Osaka | 2022-03-08 |
| 8 | Hana Y. | Osaka | 2024-07-19 |
products
What the shop sells
idinteger: Product numbernametext: Namecategorytext: Categorypricereal: Price in dollars
Sample rows (8)
| id | name | category | price |
|---|---|---|---|
| 1 | Desk lamp | Lighting | 34.5 |
| 2 | Notebook A5 | Stationery | 4.25 |
| 3 | Monitor arm | Furniture | 89 |
| 4 | Gel pens (10) | Stationery | 7.8 |
| 5 | Standing mat | Furniture | 45 |
| 6 | USB-C hub | Electronics | 29.99 |
| 7 | Webcam HD | Electronics | 59 |
| 8 | Desk organiser | Stationery | 18.4 |
orders
One row per order
idinteger: Order numbercustomer_idinteger: Who ordered (customers.id)orderedtext: Order date (YYYY-MM-DD)statustext: placed, shipped or cancelled
Sample rows (10)
| id | customer_id | ordered | status |
|---|---|---|---|
| 1 | 1 | 2024-09-02 | shipped |
| 2 | 2 | 2024-09-05 | shipped |
| 3 | 1 | 2024-09-17 | cancelled |
| 4 | 3 | 2024-10-01 | shipped |
| 5 | 4 | 2024-10-03 | placed |
| 6 | 2 | 2024-10-11 | shipped |
| 7 | 6 | 2024-10-15 | shipped |
| 8 | 7 | 2024-10-22 | cancelled |
| 9 | 5 | 2024-11-02 | placed |
| 10 | 1 | 2024-11-06 | shipped |
order_items
The products in each order
order_idinteger: Which order (orders.id)product_idinteger: Which product (products.id)qtyinteger: How many
Sample rows (15)
| order_id | product_id | qty |
|---|---|---|
| 1 | 1 | 1 |
| 1 | 2 | 3 |
| 2 | 6 | 1 |
| 2 | 4 | 2 |
| 3 | 3 | 1 |
| 4 | 7 | 1 |
| 4 | 2 | 5 |
| 5 | 5 | 1 |
| 6 | 1 | 2 |
| 7 | 6 | 2 |
| 7 | 4 | 1 |
| 8 | 7 | 1 |
| 9 | 2 | 2 |
| 10 | 3 | 1 |
| 10 | 4 | 4 |
Result
Run your query to see its rows, or Check it against every dataset.
