fix: Update rank overhaul views with improved filtering

- Update join condition in `006_AddRankOverhaulViews.sql` to filter PlayerRecords by `Style = 0`
- Modify `GROUP BY` clause to group by `PlayerRecords.SteamID` instead of `PlayerPoints.SteamID`
- Add an empty line at the end of the file for formatting consistency
This commit is contained in:
MSWS
2025-05-20 20:04:25 -07:00
parent cdad78cba0
commit b495f9cce8

View File

@@ -107,6 +107,7 @@ FROM ((`PlayerRanks` `Ranks` JOIN `MapWRs` `MWR`
CREATE VIEW IF NOT EXISTS cs2_surf.PlayerLeaderboard AS
SELECT `PP`.`SteamID` AS `SteamID`, `PR`.`PlayerName` AS `PlayerName`, SUM(`PP`.`Points`) AS `GlobalPoints`
FROM (`PlayerPoints` `PP` JOIN `PlayerRecords` `PR` ON (`PP`.`SteamID` = `PR`.`SteamID`))
GROUP BY `PP`.`SteamID`;
FROM (`cs2_surf`.`PlayerPoints` `PP` JOIN `cs2_surf`.`PlayerRecords` `PR` ON (`PP`.`SteamID` = `PR`.`SteamID` AND `PR`.Style = 0))
GROUP BY `PR`.`SteamID`;