task DISTINCT · warm-up
Office locations
Return each department location once (column location).
what to return
- Columns
location- Rows
- 3 rows · any order
- Skill
- Remove duplicate values with DISTINCT. Refresher: Unique values with DISTINCT →
expected result
Your query should return exactly these columns and values. Run it and compare.
expected result3 rows · any order
| location |
|---|
| Lisbon |
| Austin |
| Remote |
all 3 rows
data you can query
Sample rows from each table. Each column shows its type underneath; → marks a link to another table.
departments4 columns · 6 rows
| idinteger · key | nametext | locationtext | budgetreal |
|---|---|---|---|
| 1 | Engineering | Lisbon | 1100000 |
| 2 | Sales | Austin | 450000 |
| 3 | Finance | Austin | 250000 |
| 4 | People | Lisbon | 150000 |
| 5 | Design | Remote | 305000 |
showing 5 of 6 rows
solution.sql
Hints and the answer are always available. Using them counts the question as solved with help.