diff options
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/match.sql | 2 | ||||
| -rw-r--r-- | queries/match_participation.sql | 5 | ||||
| -rw-r--r-- | queries/match_results.sql | 2 | ||||
| -rw-r--r-- | queries/player.sql | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/queries/match.sql b/queries/match.sql index 970412b..0ff0c62 100644 --- a/queries/match.sql +++ b/queries/match.sql @@ -15,4 +15,4 @@ false AS "anyAFK", 0 AS "jungleMinionsSlayed", 0 AS "heroDeaths" -FROM apidata WHERE type='match' +FROM match diff --git a/queries/match_participation.sql b/queries/match_participation.sql index 0fed84b..d37983f 100644 --- a/queries/match_participation.sql +++ b/queries/match_participation.sql @@ -1,6 +1,7 @@ SELECT -id AS "player_id", +id AS "participant_id", +relationships->'player'-> 'data' ->> 'id' AS player_id, 0 AS "rosterId", 0 AS "fk_player_id", 0 AS "fk_match_results_id", @@ -20,4 +21,4 @@ attributes->>'actor' AS "hero", (attributes->'stats'->>'wentAfk')::bool::int AS "wentAfk", FALSE AS "perfectGame" -FROM apidata WHERE type='participant' +FROM participant diff --git a/queries/match_results.sql b/queries/match_results.sql index b1e750b..c493d5c 100644 --- a/queries/match_results.sql +++ b/queries/match_results.sql @@ -19,4 +19,4 @@ FALSE AS "surrender", 0 AS "afkCount", 0 AS "afkTime" -FROM apidata WHERE type='roster' +FROM roster diff --git a/queries/player.sql b/queries/player.sql index cf71d20..4f37018 100644 --- a/queries/player.sql +++ b/queries/player.sql @@ -18,4 +18,4 @@ attributes->'stats'->>'lifetimeGold' AS "lifeTimeGold", 0 AS "lifeTimeKD", 0 AS "lifeTimeKDA" -FROM apidata WHERE type='player' +FROM player |
