Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge Order By | Filtering Statements
SQL Tutorial for Beginners

book
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:

SELECT * FROM songs
ORDER BY singer, title
12
SELECT * FROM songs ORDER BY singer, title
copy
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

select * from songs
where singer = 'AC/DC'
order by title, album desc

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 6

Query ResultQuery Result
No query executed yet...

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt