task SELECT columns · warm-up
Customer list
Return customer_id, country and region for every Retail customer.
what to return
- Columns
customer_idcountryregionin this order- Rows
- 848 rows · any order
- Skill
- Select named columns from one table. Refresher: Meet your first SELECT →
expected result
Your query should return exactly these columns and values. Run it and compare.
expected result848 rows · any order
| customer_id | country | region |
|---|---|---|
| 12347 | Iceland | Europe |
| 12353 | Bahrain | Rest of World |
| 12359 | Cyprus | Europe |
first 3 of 848 rows
data you can query
Retail dataset: the first 6 rows of each table. Under each column name: the kind of value it holds, and which table it links to. Your queries run on all rows.
customers4 columns · 848 rows
| customer_idnumber · unique id | countrytext | regiontext | first_order_atdate & time |
|---|---|---|---|
| 12347 | Iceland | Europe | 2010-10-31 14:20:00 |
| 12353 | Bahrain | Rest of World | 2010-10-27 12:44:00 |
| 12359 | Cyprus | Europe | 2009-12-05 13:32:00 |
| 12373 | Austria | Europe | 2010-02-04 12:08:00 |
| 12374 | Austria | Europe | 2010-04-30 14:01:00 |
| 12384 | Switzerland | Europe | 2011-08-10 11:23:00 |
- customer_idnumber · unique id
- 12347
- countrytext
- Iceland
- regiontext
- Europe
- first_order_atdate & time
- 2010-10-31 14:20:00
- customer_idnumber · unique id
- 12353
- countrytext
- Bahrain
- regiontext
- Rest of World
- first_order_atdate & time
- 2010-10-27 12:44:00
- customer_idnumber · unique id
- 12359
- countrytext
- Cyprus
- regiontext
- Europe
- first_order_atdate & time
- 2009-12-05 13:32:00
- customer_idnumber · unique id
- 12373
- countrytext
- Austria
- regiontext
- Europe
- first_order_atdate & time
- 2010-02-04 12:08:00
- customer_idnumber · unique id
- 12374
- countrytext
- Austria
- regiontext
- Europe
- first_order_atdate & time
- 2010-04-30 14:01:00
- customer_idnumber · unique id
- 12384
- countrytext
- Switzerland
- regiontext
- Europe
- first_order_atdate & time
- 2011-08-10 11:23:00
first 6 of 848 rows · your queries use all of them
solution.sql
Hints and the answer are always available. Using them counts the question as solved with help.