Winrate has three SQL datasets. The SQL console and the assistant read ranked and pro games in ClickHouse. The SQL tab on a player's page reads a SQLite database of that player's games, and on a match page the assistant reads a SQLite database of that one match.
The table and column lists on this page are generated from the code when the site is built: the ClickHouse lists from the schema the console and the assistant use, the SQLite lists from the migrations that create each database.
Tables
ClickHouse: ranked and pro games
summoner_match(219 columns): One row per player per match (main table)match(48 columns): One row per match (game-level data)summoner_match_timeline(50 columns): Build paths and early game statssummoner_match_timeline_frame(59 columns): Per-minute frame datamatch_timeline_event(35 columns): Individual match events (kills, items, etc.)champion_pairwise_stats(10 columns): Precomputed synergy/counter statssummoner_leaderboard(18 columns): Aggregated ranked ladder data for leaderboard queriespro_match(159 columns): One row per pro team-side gamepro_summoner_match(132 columns): One row per pro player-game
summoner_leaderboard has one row per player per region.
SQLite: one player
summoner_match(38 columns): primary keymatch_id,puuidsummoner_match_stats(91 columns): primary keymatch_id,puuidsummoner_match_timeline(23 columns): primary keymatch_id,puuid
These hold the player's own rows from ClickHouse's summoner_match and summoner_match_timeline, with some of their columns. summoner_match is split in two: the scoreboard stays in summoner_match, and damage, economy, objective and challenge stats go to summoner_match_stats.
SQLite: one match
match(49 columns): primary keymatch_idmatch_timeline_event(29 columns): primary keymatch_id,event_idmetadata(2 columns): primary keykeysummoner_match(86 columns): primary keymatch_id,puuidsummoner_match_challenges(81 columns): primary keymatch_id,puuidsummoner_match_timeline_frame(31 columns): primary keymatch_id,puuid,frame_numberwin_probability(6 columns): primary keymatch_id,frame_number
match has the game's totals and objective counts, summoner_match the ten players' final scoreboard, and summoner_match_challenges their advanced combat, vision and laning metrics. summoner_match_timeline_frame has each player's state at every frame, match_timeline_event the kills, objectives and item events, and win_probability blue side's win probability at every frame, with the gold and kill difference. metadata is the database's own sync state.
Encoded values
tierandrankare NULL for an unranked player, and always NULL in a match's SQLite database.winis aBoolin ClickHouse'ssummoner_matchand 1 or 0 in the pro and SQLite tables.summoner_match_timelineand ClickHouse'ssummoner_match_timeline_framecall itwon.team_idis 100 for blue side and 200 for red, as inmatch'steam_100_*andteam_200_*columns. The pro tables havesideinstead:BlueorRed.game_durationis in seconds.- In a match's SQLite database,
timestampis milliseconds since the game started. champion_id, theitem_*columns and theperk_*columns hold Riot's ids. The pro tables name champions instead, inchampion_nameand thepick_*andban_*columns.pro_match.positionis alwaysTEAM. The pro tables haveleague,year,splitandplayoffs(1 for a playoff game) where the ranked tables haveregionandtier.
How the tables join
In ClickHouse:
summoner_match,summoner_match_timelineandsummoner_match_timeline_frameshare(match_id, puuid). A frame addsframe_number.matchandmatch_timeline_eventjoin to them onmatch_id. An event'spuuid,killer_puuidandvictim_puuidare players.- The timeline, frame and event tables repeat
champion_id,position,patch,queue_id,regionandtier, so many questions need no join. - These five tables are partitioned by
patch. Filter every table in a join bypatch. champion_pairwise_statshas one row per champion and position, other champion and position,is_ally(true for teammates, false for opponents),patchandtier. Sumgamesandwinsover the patches and tiers you want.summoner_leaderboardjoins tosummoner_matchonpuuid.pro_summoner_matchjoins to its team'spro_matchrow on(match_id, side). The pro tables share no ids with the ranked ones.
In SQLite:
- A player's three tables join on
(match_id, puuid). - A match's
summoner_match,summoner_match_challengesandsummoner_match_timeline_framejoin onpuuid. Frames, events andwin_probabilityjoin onframe_number.
Sample queries
A champion's win rate by role. Ahri is champion_id 103, and tier >= 6 is Diamond and above:
A join. Gold difference at 10 minutes is in summoner_match_timeline and vision score is in summoner_match, here for Challenger junglers, wins against losses. Both tables are filtered:
One player's roles, in the SQL tab on their page (SQLite):
Columns
Each line is a column and its type. ClickHouse types are written as DESCRIBE TABLE prints them. SQLite columns are TEXT, INTEGER or REAL, and nullable marks the ones that can be NULL.




































































































