File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class LeaderboardRepository {
2727 LEFT JOIN start_stats ss ON ss.post_id = p.id
2828 WHERE u.email IS NOT NULL
2929 GROUP BY u.id, u.email
30- ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC
30+ ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC, u.id
3131 LIMIT $2;
3232 ` ;
3333 const result = await this . pool . query ( query , [ dateRange , limit ] ) ;
@@ -58,7 +58,7 @@ export class LeaderboardRepository {
5858 LEFT JOIN today_stats ts ON ts.post_id = p.id
5959 LEFT JOIN start_stats ss ON ss.post_id = p.id
6060 WHERE p.is_active = true
61- ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC
61+ ORDER BY ${ this . SORT_COL_MAPPING [ sort ] } DESC, p.id
6262 LIMIT $2;
6363 ` ;
6464 const result = await this . pool . query ( query , [ dateRange , limit ] ) ;
You can’t perform that action at this time.
0 commit comments