Not getting appropriate answer in ORDER BY part

—24) Write a query that returns all rows from 2010 ordered by rank, with artists ordered alphabetically for each song.

FROM tutorial.billboard_top_100_year_end
WHERE year = 2010
ORDER BY year_rank, artist ASC

For this the artist are not ordered in alphabetical order.

you are getting appropriate answer here as the order will be done first for year_rank and then artist will be ordered for each year_rank.

So for eg. all the artists for year_rank 6 will come together in one place and then inside this group the artists will be ordered properly.

so for year_rank 6, you can observe that BoB is coming first and then Hayley is coming up.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.