Easy SELECT & filtering Free

SQL interview question: Convert Seconds to Minutes

Convert Track Duration to Minutes

The music app needs to display track lengths in a user-friendly format.

Convert each track's duration_seconds to minutes, rounded to 2 decimal places.

Return title and duration_minutes. Order by track_id and limit to 10 results.

Skills: arithmetic operations and ROUND function

Tables

tracks 40 rows
  • track_id integer PK
  • title text
  • album_id integer → albums
  • duration_seconds integer
track_idtitlealbum_idduration_seconds
1Come Together1259
2Something1182
3Here Comes the Sun1185

Keep going