Make Query view affect ping data retrieved

All ping data was being used to create average.

This allows comparing ping over time
This commit is contained in:
Aurora Lahtela 2024-01-27 14:01:14 +02:00
parent 7494902e46
commit 3ad5d577d4
1 changed files with 2 additions and 0 deletions

View File

@ -107,6 +107,8 @@ public class QueryTablePlayersQuery implements Query<List<TablePlayer>> {
"MIN(p." + PingTable.MIN_PING + ") as " + PingTable.MIN_PING +
FROM + PingTable.TABLE_NAME + " p" +
WHERE + "p." + PingTable.USER_ID + userIdsInSet +
AND + "p." + PingTable.DATE + ">=" + afterDate +
AND + "p." + PingTable.DATE + "<=" + beforeDate +
(serverUUIDs.isEmpty() ? "" : AND + "p." + PingTable.SERVER_ID + " IN (" + selectServerIds + ")") +
GROUP_BY + "p." + PingTable.USER_ID;