mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-23 04:21:51 -07:00
fix: stabilized the order of top items
This commit is contained in:
parent
a1b6724179
commit
c9042e19ad
6 changed files with 12 additions and 12 deletions
|
|
@ -41,7 +41,7 @@ JOIN artist_releases ar ON r.id = ar.release_id
|
|||
WHERE ar.artist_id = $5
|
||||
AND l.listened_at BETWEEN $1 AND $2
|
||||
GROUP BY r.id, r.title, r.musicbrainz_id, r.various_artists, r.image, r.image_source
|
||||
ORDER BY listen_count DESC
|
||||
ORDER BY listen_count DESC, r.id
|
||||
LIMIT $3 OFFSET $4;
|
||||
|
||||
-- name: GetTopReleasesPaginated :many
|
||||
|
|
@ -54,7 +54,7 @@ JOIN tracks t ON l.track_id = t.id
|
|||
JOIN releases_with_title r ON t.release_id = r.id
|
||||
WHERE l.listened_at BETWEEN $1 AND $2
|
||||
GROUP BY r.id, r.title, r.musicbrainz_id, r.various_artists, r.image, r.image_source
|
||||
ORDER BY listen_count DESC
|
||||
ORDER BY listen_count DESC, r.id
|
||||
LIMIT $3 OFFSET $4;
|
||||
|
||||
-- name: CountTopReleases :one
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue