Challenge: Non-Europe Capitals Sort
Here is the country
table we are working with:
Task
Swipe to start coding
Write an SQL query to get the name
, capital
, and continent
columns from the country
table (please retrieve these columns in this order). These countries must be not from the Europe
continent. Sort the result by the capital
column.
Note
europe
is not the same asEurope
, so be careful and write:Europe
correctly.
Solution
9
1
2
3
4
SELECT name, capital, continent
FROM country
WHERE NOT continent = 'Europe'
ORDER BY capital;
Everything was clear?
Thanks for your feedback!
Section 4. Chapter 6
9
1
No query executed yet... |
Ask AI
Ask anything or try one of the suggested questions to begin our chat