summaryrefslogtreecommitdiff
path: root/queries/match_results.sql
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-02-15 16:02:32 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-02-15 16:02:32 +0100
commit0455416095e0347d644716d4438fb2b8b14c8db2 (patch)
tree1507cbc9964f37cfebe9c525929209c064ed33ff /queries/match_results.sql
parentf716c0f770c3a482350089348fa919a626452bf4 (diff)
downloadshrinker-0455416095e0347d644716d4438fb2b8b14c8db2.tar.gz
shrinker-0455416095e0347d644716d4438fb2b8b14c8db2.zip
load processor queries from sql files
Diffstat (limited to 'queries/match_results.sql')
-rw-r--r--queries/match_results.sql22
1 files changed, 22 insertions, 0 deletions
diff --git a/queries/match_results.sql b/queries/match_results.sql
new file mode 100644
index 0000000..b1e750b
--- /dev/null
+++ b/queries/match_results.sql
@@ -0,0 +1,22 @@
+SELECT
+
+attributes->'stats'->>'side' AS "team",
+FALSE AS "winner",
+FALSE AS "surrender",
+0 AS "teamSize",
+'' AS "hero_1",
+'' AS "hero_2",
+'' AS "hero_3",
+0 AS "laneMinionsSlayed",
+0 AS "jungleMinionsSlayed",
+(attributes->'stats'->>'turretKills')::int AS "turretsDestroyed",
+(attributes->'stats'->>'heroKills')::int AS "kills",
+0 AS "assists",
+0 AS "deaths",
+(attributes->'stats'->>'krakenCaptures')::int AS "krakenCaptures",
+0 AS "goldMineCaptures",
+0 AS "crystalMineCaptures",
+0 AS "afkCount",
+0 AS "afkTime"
+
+FROM apidata WHERE type='roster'