From 0455416095e0347d644716d4438fb2b8b14c8db2 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Wed, 15 Feb 2017 16:02:32 +0100
Subject: load processor queries from sql files

---
 queries/player.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 queries/player.sql

(limited to 'queries/player.sql')

diff --git a/queries/player.sql b/queries/player.sql
new file mode 100644
index 0000000..cf71d20
--- /dev/null
+++ b/queries/player.sql
@@ -0,0 +1,21 @@
+SELECT
+
+id AS "apiId",
+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'->>'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"
+
+FROM apidata WHERE type='player'
-- 
cgit v1.3.1

