runtime
07 / 139

task DISTINCT · warm-up

Countries customers come from

Find every distinct country represented by a customer. Return country.

what to return

Columns
country
Rows
27 rows · any order
Skill
Return each distinct value once. Refresher: Unique values with DISTINCT →

expected result

expected result27 rows · any order
country
Australia
Austria
Bahrain

first 3 of 27 rows

data you can query

customers4 columns · 848 rows
customer_idnumber · unique idcountrytextregiontextfirst_order_atdate & time
12347IcelandEurope2010-10-31 14:20:00
12353BahrainRest of World2010-10-27 12:44:00
12359CyprusEurope2009-12-05 13:32:00
12373AustriaEurope2010-02-04 12:08:00
12374AustriaEurope2010-04-30 14:01:00
12384SwitzerlandEurope2011-08-10 11:23:00
12389AustraliaRest of World2010-02-22 10:15:00
12392AustraliaRest of World2010-04-27 14:04:00
12404FinlandEurope2010-01-26 16:25:00
12416AustraliaRest of World2010-02-21 10:19: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
customer_idnumber · unique id
12389
countrytext
Australia
regiontext
Rest of World
first_order_atdate & time
2010-02-22 10:15:00
customer_idnumber · unique id
12392
countrytext
Australia
regiontext
Rest of World
first_order_atdate & time
2010-04-27 14:04:00
customer_idnumber · unique id
12404
countrytext
Finland
regiontext
Europe
first_order_atdate & time
2010-01-26 16:25:00
customer_idnumber · unique id
12416
countrytext
Australia
regiontext
Rest of World
first_order_atdate & time
2010-02-21 10:19:00

first 10 of 848 rows · your queries use all of them

solution.sql
 
Output

Hints and the answer are always available. Using them counts the question as solved with help.

Countries customers come from — SQL practice · Runtime