Each country once
An SQL exercise from Querydrill. Solve it with a SQL editor in your browser, checked on the rows it returns and again on changed data, and it is checked the moment you submit.
The task
List every country that has at least one customer, each country only once.
What this exercise teaches
DISTINCT removes duplicate rows from the result.
A hint if you get stuck
Put DISTINCT right after SELECT.
Try it now, no account needed
This exercise is free. Open it on the practice page, solve it, and get instant feedback with a hint and a worked solution after two tries.
Open this exercise