if i do the following in SQLite, i can get albums and the sum lengths of all their tracks, or length of the album. the Album table has id (primary key) and title. Tracks table has id (primary key), name, length, rating, count, album_id, genre_id.
SELECT title, SUM(length)
FROM Album JOIN Tracks ON Tracks.id=Album.id
GROUP BY album_id
How can I print ONLY the album title of longest album?
1 Answer