From 6dfc71bf6b4d617ffc10f60cdc06b376e26b1c34 Mon Sep 17 00:00:00 2001 From: Kapil Viren Ahuja Date: Fri, 17 Feb 2017 15:54:55 +0530 Subject: refactored to adapt to changes in Web's DB model. this will only work with branch - https://github.com/vainglorygame/vainsocial.com/tree/features/db-model-refactoring --- queries/player.sql | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'queries') 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 -- cgit v1.3.1