Fixed more sql errors

This commit is contained in:
Rsl1122 2019-09-21 11:07:07 +03:00
parent dfbfb99b2d
commit 27b2bf10d0
2 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ public class ExtensionServerPlayerDataTableQuery implements Query<Map<UUID, Exte
",MAX(" + SessionsTable.SESSION_END + ") as last_seen" +
FROM + SessionsTable.TABLE_NAME +
GROUP_BY + SessionsTable.TABLE_NAME + '.' + SessionsTable.USER_UUID +
ORDER_BY + SessionsTable.SESSION_END + " DESC LIMIT ?";
ORDER_BY + "last_seen DESC LIMIT ?";
String sql = SELECT +
"v1." + ExtensionPlayerValueTable.USER_UUID + " as uuid," +
@ -126,7 +126,7 @@ public class ExtensionServerPlayerDataTableQuery implements Query<Map<UUID, Exte
",MAX(" + SessionsTable.SESSION_END + ") as last_seen" +
FROM + SessionsTable.TABLE_NAME +
GROUP_BY + SessionsTable.TABLE_NAME + '.' + SessionsTable.USER_UUID +
ORDER_BY + SessionsTable.SESSION_END + " DESC LIMIT ?";
ORDER_BY + "last_seen DESC LIMIT ?";
String sql = SELECT +
"v1." + ExtensionGroupsTable.USER_UUID + " as uuid," +

View File

@ -69,7 +69,7 @@ public class ServerTablePlayersQuery implements Query<List<TablePlayer>> {
GROUP_BY + GeoInfoTable.USER_UUID;
String selectLatestGeolocations = SELECT +
"g1." + GeoInfoTable.GEOLOCATION + ',' +
DISTINCT + "g1." + GeoInfoTable.USER_UUID +
"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 +
DISTINCT + "u." + UsersTable.USER_UUID + ',' +
"u." + UsersTable.USER_UUID + ',' +
"u." + UsersTable.USER_NAME + ',' +
"u." + UsersTable.REGISTERED + ',' +
UserInfoTable.BANNED + ',' +