The DQ sample answer pre-calculated the
length_seconds in the subquery base on integer division and truncated factions of a second per track before it is aggregated in the main query.
WITH playlist_info AS ( SELECT p.playlist_id, p.name playlist_name, t.name track_name, (t.milliseconds / 1000) length_seconds /* integer division truncated fractions of a second */ FROM playlist p LEFT JOIN playlist_track pt ON pt.playlist_id = p.playlist_id LEFT JOIN track t ON t.track_id = pt.track_id )
I apply the conversion to seconds in the main query instead of the subquery and get different
length_seconds in some play list.