Challenge Order By
Remember how to order the records by multiple columns. Let's say, you want to order all records by singer's name first and then by song's title:
9
1
2
SELECT * FROM songs
ORDER BY singer, title
12SELECT * FROM songs ORDER BY singer, title
Task
Swipe to start coding
Select records with AC/DC songs, and order it by title
from A to Z, and then by album
from Z to A.
Solution
9
1
2
3
select * from songs
where singer = 'AC/DC'
order by title, album desc
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
9
1
No query executed yet... |
Ask AI
Ask anything or try one of the suggested questions to begin our chat