Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "pg" (31 ms)
- SELECT what, amount, gamemode, date, champion_id, id, result
- FROM
- (
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'kills' AS what, kills AS amount, row_number() over (ORDER BY kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'deaths' AS what, deaths AS amount, row_number() over (ORDER BY deaths DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'assists' AS what, assists AS amount, row_number() over (ORDER BY assists DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'gold' AS what, gold AS amount, row_number() over (ORDER BY gold DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'minions' AS what, minions AS amount, row_number() over (ORDER BY minions DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'kda' AS what, kda AS amount, row_number() over (ORDER BY kda DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'damage_taken' AS what, damage_taken AS amount, row_number() over (ORDER BY damage_taken DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'damage_dealt_champions' AS what, damage_dealt_champions AS amount, row_number() over (ORDER BY damage_dealt_champions DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'damage_dealt_objectives' AS what, damage_dealt_objectives AS amount, row_number() over (ORDER BY damage_dealt_objectives DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'kp' AS what, kp AS amount, row_number() over (ORDER BY kp DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'vision_score' AS what, vision_score AS amount, row_number() over (ORDER BY vision_score DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'critical_strike' AS what, critical_strike AS amount, row_number() over (ORDER BY critical_strike DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'time_spent_living' AS what, time_spent_living AS amount, row_number() over (ORDER BY time_spent_living DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'heal' AS what, heal AS amount, row_number() over (ORDER BY heal DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'turret_kills' AS what, turret_kills AS amount, row_number() over (ORDER BY turret_kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'killing_spree' AS what, killing_spree AS amount, row_number() over (ORDER BY killing_spree DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'double_kills' AS what, double_kills AS amount, row_number() over (ORDER BY double_kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'triple_kills' AS what, triple_kills AS amount, row_number() over (ORDER BY triple_kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'quadra_kills' AS what, quadra_kills AS amount, row_number() over (ORDER BY quadra_kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- UNION ALL
- SELECT match_teams.result AS result, matches.id AS id, date, gamemode, champion_id, 'penta_kills' AS what, penta_kills AS amount, row_number() over (ORDER BY penta_kills DESC) AS rn FROM match_players INNER JOIN matches ON matches.id = match_players.match_id INNER JOIN match_teams ON match_players.match_id = match_teams.match_id AND match_players.team = match_teams.color WHERE match_players.summoner_puuid = 'EdlDRRAPVUAYf9iDPF9iKNyF-6rkpnXXBLiF4VUfcPYZXV9xaiQsgGKiaIz4IgBX3JCiL_oS5fmXAQ'
- AND match_teams.result != 'Remake' AND matches.gamemode NOT IN (800, 810, 820, 830, 840, 850, 2000, 2010, 2020)
- ) all_candidates
- WHERE rn = 1;
Advertisement
Add Comment
Please, Sign In to add comment