Abaixo está uma instrução que descreve uma tarefa de geração de SQL, combinada com uma entrada que fornece mais contexto sobre os esquemas de tabela disponíveis. Escreva o código SQL que responda adequadamente à solicitação
 ###Instrução: Liste os jogos e a média de número de kills efetivas para os 3 melhores jogadores.
 ###Tabelas: 
CREATE TABLE PlayerStats (PlayerID INT, Game VARCHAR(50), Kills INT, Deaths INT, Assists INT); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (1, 'FPS Game', 50, 30, 15); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (2, 'RPG Game', 20, 10, 30); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (3, 'FPS Game', 60, 20, 20); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (4, 'RPG Game', 30, 5, 40); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (5, 'FPS Game', 70, 25, 25); INSERT INTO PlayerStats (PlayerID, Game, Kills, Deaths, Assists) VALUES (6, 'RPG Game', 40, 10, 50);
SELECT Game, AVG(EffectiveKills) AS AvgEffectiveKills FROM (SELECT PlayerID, Game, Kills + Assists - Deaths AS EffectiveKills, ROW_NUMBER() OVER (PARTITION BY Game ORDER BY Kills + Assists - Deaths DESC) AS Rank FROM PlayerStats) AS PlayerStatsRank WHERE Rank <= 3 GROUP BY Game;