Back to Weekly Calendar Hub
hardDB: SPOTIFYLITE

Sunday's Quest: Royalty stream rankings (SpotifyLite)

XP REWARD
+500 XP

Business Context & Instructions

Your product manager wants to build a trending leaderboard. Write a SQL query using a window ranking function to calculate the chronological rank of songs based on their length (duration_seconds) descending. Order the results from longest to shortest.

Expected Output Columns:
  • song_title
  • track_duration_rank
Table Schema Reference
songs (id, artist_id, title, duration_seconds, genre, streams)
artists (id, name, country, genre)
SQL Query WorkspaceSQLite v3.45 (WASM Mode)
QUICK INSERT:
1