mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-07 04:18:26 +02:00
Attempt to fix duplicate players on Players table
This commit is contained in:
parent
74bc647ff1
commit
146c990eb6
@ -67,7 +67,7 @@ public class NetworkTablePlayersQuery implements Query<List<TablePlayer>> {
|
||||
GROUP_BY + GeoInfoTable.USER_UUID;
|
||||
String selectLatestGeolocations = SELECT +
|
||||
"g1." + GeoInfoTable.GEOLOCATION + ',' +
|
||||
"g1." + GeoInfoTable.USER_UUID +
|
||||
DISTINCT + "g1." + GeoInfoTable.USER_UUID +
|
||||
FROM + "(" + selectGeolocations + ") AS g1" +
|
||||
INNER_JOIN + "(" + selectLatestGeolocationDate + ") AS g2 ON g1.uuid = g2.uuid" +
|
||||
WHERE + GeoInfoTable.LAST_USED + "=last_used_g";
|
||||
@ -84,7 +84,7 @@ public class NetworkTablePlayersQuery implements Query<List<TablePlayer>> {
|
||||
WHERE + UserInfoTable.BANNED + "=?";
|
||||
|
||||
String selectBaseUsers = SELECT +
|
||||
"u." + UsersTable.USER_UUID + ',' +
|
||||
DISTINCT + "u." + UsersTable.USER_UUID + ',' +
|
||||
"u." + UsersTable.USER_NAME + ',' +
|
||||
"u." + UsersTable.REGISTERED + ',' +
|
||||
"ban." + UserInfoTable.USER_UUID + " as banned," +
|
||||
|
@ -69,7 +69,7 @@ public class ServerTablePlayersQuery implements Query<List<TablePlayer>> {
|
||||
GROUP_BY + GeoInfoTable.USER_UUID;
|
||||
String selectLatestGeolocations = SELECT +
|
||||
"g1." + GeoInfoTable.GEOLOCATION + ',' +
|
||||
"g1." + GeoInfoTable.USER_UUID +
|
||||
DISTINCT + "g1." + GeoInfoTable.USER_UUID +
|
||||
FROM + "(" + selectGeolocations + ") AS g1" +
|
||||
INNER_JOIN + "(" + selectLatestGeolocationDate + ") AS g2 ON g1.uuid = g2.uuid" +
|
||||
WHERE + GeoInfoTable.LAST_USED + "=last_used_g";
|
||||
@ -83,7 +83,7 @@ public class ServerTablePlayersQuery implements Query<List<TablePlayer>> {
|
||||
GROUP_BY + "s." + SessionsTable.USER_UUID;
|
||||
|
||||
String selectBaseUsers = SELECT +
|
||||
"u." + UsersTable.USER_UUID + ',' +
|
||||
DISTINCT + "u." + UsersTable.USER_UUID + ',' +
|
||||
"u." + UsersTable.USER_NAME + ',' +
|
||||
"u." + UsersTable.REGISTERED + ',' +
|
||||
UserInfoTable.BANNED + ',' +
|
||||
|
Loading…
Reference in New Issue
Block a user