diff --git a/app/src/main/kotlin/com/hippo/ehviewer/dao/DownloadsDao.kt b/app/src/main/kotlin/com/hippo/ehviewer/dao/DownloadsDao.kt index 4662b508b..6756caf64 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/dao/DownloadsDao.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/dao/DownloadsDao.kt @@ -17,7 +17,7 @@ interface DownloadsDao { fun countByLabel(): Flow> @Suppress("ktlint:standard:annotation") - @Query("SELECT ARTIST, COUNT(*) AS COUNT FROM DOWNLOADS LEFT JOIN DOWNLOAD_ARTISTS USING(GID) GROUP BY ARTIST ORDER BY ARTIST") + @Query("SELECT ARTIST, COUNT(*) AS COUNT FROM DOWNLOADS LEFT JOIN DOWNLOAD_ARTISTS USING(GID) GROUP BY ARTIST ORDER BY COUNT DESC, ARTIST") fun countByArtist(): Flow> @Query("SELECT * FROM DOWNLOADS ORDER BY TIME")