summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-12 13:01:58 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-12 13:01:58 +0100
commit5df8cc227bf8969fa4d9eca5a67b38b43be91b5b (patch)
tree792ea76dc44b0dc738c7251502f0248798ea7ca4
parent7098a1b835b6f7aca6c68cab60fe4858ea2abf1e (diff)
downloadshrinker-5df8cc227bf8969fa4d9eca5a67b38b43be91b5b.tar.gz
shrinker-5df8cc227bf8969fa4d9eca5a67b38b43be91b5b.zip
player: insert skill_tier
-rw-r--r--queries/player.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/queries/player.sql b/queries/player.sql
index 209aabb..d718391 100644
--- a/queries/player.sql
+++ b/queries/player.sql
@@ -9,6 +9,7 @@ participants AS (SELECT
JSONB_ARRAY_ELEMENTS(rosters.roster->'relations') AS participant
FROM rosters),
players AS (SELECT
+ participants.participant->'data'->'attributes'->'stats'->>'skillTier' AS skill_tier,
shardid,
matchdate,
JSONB_ARRAY_ELEMENTS(participants.participant->'relations') AS player
@@ -27,7 +28,7 @@ players.player->'data'->'attributes'->>'name' AS "name",
(players.player->'data'->'attributes'->'stats'->>'wins')::int AS "wins",
(players.player->'data'->'attributes'->'stats'->>'lifetimeGold')::float AS "lifetime_gold",
matchdate AS "last_match_created_date",
-
+skill_tier AS "skill_tier",
0 AS "streak"
FROM players