Replace sub.guild_id = dl.guild_id with sub.guild_id = $1 in all
5 stats queries to satisfy PostgreSQL GROUP BY strictness.
PostgreSQL requires columns in correlated subqueries to appear in
the outer GROUP BY, but guild_id was not grouped. Since the outer
query already filters by WHERE guild_id = $1, using $1 directly
in the subquery is correct and avoids the error.
Affected: GetLeaderboard, GetUserStats, GetStatsInRange,
GetYearlyLeaderboard, GetUserYearlyStats