mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 16:37:58 +01:00
Changed a query using wrong table
Activity index grouping query for /network page was using plan_user_info instead of plan_users. This lead to duplication of users if a player had played on multiple servers. Affects issues: - Fixed #1216
This commit is contained in:
parent
1b2342fe11
commit
113ca21343
@ -20,7 +20,6 @@ import com.djrapitops.plan.delivery.domain.mutators.ActivityIndex;
|
||||
import com.djrapitops.plan.storage.database.queries.Query;
|
||||
import com.djrapitops.plan.storage.database.queries.QueryStatement;
|
||||
import com.djrapitops.plan.storage.database.sql.tables.SessionsTable;
|
||||
import com.djrapitops.plan.storage.database.sql.tables.UserInfoTable;
|
||||
import com.djrapitops.plan.storage.database.sql.tables.UsersTable;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
@ -141,9 +140,9 @@ public class NetworkActivityIndexQueries {
|
||||
String selectActivityIndex = selectActivityIndexSQL();
|
||||
|
||||
String selectIndexes = SELECT + "? as activity_group, activity_index" +
|
||||
FROM + UserInfoTable.TABLE_NAME + " u" +
|
||||
LEFT_JOIN + '(' + selectActivityIndex + ") s on s." + SessionsTable.USER_UUID + "=u." + UserInfoTable.USER_UUID +
|
||||
AND + "u." + UserInfoTable.REGISTERED + "<=?";
|
||||
FROM + UsersTable.TABLE_NAME + " u" +
|
||||
LEFT_JOIN + '(' + selectActivityIndex + ") s on s." + SessionsTable.USER_UUID + "=u." + UsersTable.USER_UUID +
|
||||
AND + "u." + UsersTable.REGISTERED + "<=?";
|
||||
|
||||
String selectCount = SELECT + "activity_group, COUNT(1) as count" + FROM +
|
||||
'(' + selectIndexes + ") indexes" +
|
||||
|
Loading…
Reference in New Issue
Block a user