update state history query

This commit is contained in:
Fran Jurmanović
2025-09-13 14:41:52 +02:00
parent a70d923a6a
commit 13fee88a6d

View File

@@ -187,7 +187,7 @@ func (r *StateHistoryRepository) GetRecentSessions(ctx context.Context, filter *
FROM state_histories FROM state_histories
WHERE server_id = ? AND date_created BETWEEN ? AND ? WHERE server_id = ? AND date_created BETWEEN ? AND ?
GROUP BY session_id GROUP BY session_id
HAVING COUNT(*) > 1 AND MAX(player_count) > 0 HAVING MAX(player_count) > 0
ORDER BY date DESC ORDER BY date DESC
LIMIT 10 LIMIT 10
` `