This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

10 lines
557 B
SQL

CREATE INDEX RankingIndex ON Ranking(FK_playerid);
CREATE INDEX PlayerIndex1 ON MatchesWithNames(PlayerOne);
CREATE INDEX PlayerIndex2 ON MatchesWithNames(PlayerTwo);
CREATE INDEX PlayerIndex3 ON MatchesWithNames(Winner);
CREATE INDEX PLayerIndex4 ON Player(playerid);
SELECT PlayerOne, PlayerTwo, resultSets, Winner, rank AS 'Winner rank', points AS 'Winner points', record AS 'Winner record' FROM MatchesWithNames
INNER JOIN Player P1 ON (P1.first_name || ' ' || P1.last_name) = Winner
INNER JOIN Ranking ON P1.playerid = Ranking.FK_playerid
LIMIT 3500;