Modules
Data Analyst
Data Engineer
Product Data Scientist
AI Engineer
Machine Learning Engineer
Prompt Engineer
Using the same music_chart table, write a SQL query to find these 5 songs from the year 2020 and 2021. You need to sort them first by their artist's name in descending order then by their song_title in ascending order, and finally by their release year (oldest first).
| year_rank | year | artist | song_title |
|---|---|---|---|
| 1 | 2020 | Vibrant Keys | Melancholic Keys |
| 3 | 2020 | Urban Echo | City Lights |
Using the same music_chart table, write a SQL query to find these 5 songs from the year 2020 and 2021. You need to sort them first by their artist's name in descending order then by their song_title in ascending order, and finally by their release year (oldest first).
| year_rank | year | artist | song_title |
|---|---|---|---|
| 1 | 2020 | Vibrant Keys | Melancholic Keys |
| 3 | 2020 | Urban Echo | City Lights |
| 2 | 2021 | The Dreamers | Awake in Dreams |
| 7 | 2021 | Starlight Quartet | Starry Night |
| 7 | 2020 | Soulful Voices | Echoes of the Heart |
| 2 | 2021 | The Dreamers | Awake in Dreams |
| 7 | 2021 | Starlight Quartet | Starry Night |
| 7 | 2020 | Soulful Voices | Echoes of the Heart |