1
0
dwelling-radio/internal/statistics/db/sqlite/queries/last_n_songs.sql

19 lines
373 B
MySQL
Raw Permalink Normal View History

SELECT
`start_at`,
`artist`,
`title`,
`listeners`,
2024-05-11 05:05:27 +04:00
`peak_listeners`
FROM
(SELECT
`start_at`,
`artist`,
`title`,
`listeners`,
2024-05-11 05:05:27 +04:00
`peak_listeners`
FROM `history`
LEFT JOIN `song`
ON `song`.`song_id` = `history`.`song_id`
ORDER BY `start_at` DESC
LIMIT ? )
ORDER BY `start_at` ASC;