summaryrefslogtreecommitdiff
path: root/queries/player.sql
diff options
context:
space:
mode:
authorKapil Viren Ahuja <kvahuja@users.noreply.github.com>2017-02-19 17:04:35 +0530
committerGitHub <noreply@github.com>2017-02-19 17:04:35 +0530
commit7eb07c0ccf2f464e3936b24136e41471ff1c1ff7 (patch)
treec117aecbc2276c875edd7a328f15ea872c1c8b64 /queries/player.sql
parenteaf6b29760f13040444707eecf9c342c67bd6ffb (diff)
parentd940ad82f7e34576bf6cc6b8a93cbc298765315e (diff)
downloadshrinker-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.tar.gz
shrinker-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.zip
Merge pull request #14 from vainglorygame/features/web-db-model-refactoring
Features web db model refactoring
Diffstat (limited to 'queries/player.sql')
-rw-r--r--queries/player.sql14
1 files changed, 4 insertions, 10 deletions
diff --git a/queries/player.sql b/queries/player.sql
index 4f37018..add926a 100644
--- a/queries/player.sql
+++ b/queries/player.sql
@@ -5,17 +5,11 @@ attributes->>'name' AS "name",
(attributes->'stats'->>'level')::int AS "level",
(attributes->'stats'->>'xp')::int AS "xp",
(attributes->'stats'->>'played')::int AS "played",
-0 AS "totalGamePlaytime",
(attributes->'stats'->>'played_ranked')::int AS "playedRanked",
+(attributes->'stats'->>'played')::int - (attributes->'stats'->>'played_ranked')::int AS "playedCasual",
(attributes->'stats'->>'wins')::int AS "wins",
-(attributes->'stats'->>'winStreak')::int AS "streak",
-'' AS "herosUnlocked",
-'' "skinsUnlocked",
-attributes->'stats'->>'lifetimeGold' AS "lifeTimeGold",
-0 AS "lifeTimeKills",
-0 AS "lifeTimeDeaths",
-0 AS "lifeTimeAssists",
-0 AS "lifeTimeKD",
-0 AS "lifeTimeKDA"
+(attributes->'stats'->>'lifetimeGold')::float AS "lifetimeGold",
+
+0 AS "streak"
FROM player