From 0455416095e0347d644716d4438fb2b8b14c8db2 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 15 Feb 2017 16:02:32 +0100 Subject: load processor queries from sql files --- queries/match.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 queries/match.sql (limited to 'queries/match.sql') diff --git a/queries/match.sql b/queries/match.sql new file mode 100644 index 0000000..970412b --- /dev/null +++ b/queries/match.sql @@ -0,0 +1,18 @@ +SELECT + +id AS "match_id", +(attributes->>'duration')::int AS "duration", +attributes->>'gameMode' AS "gameMode", +COALESCE(NULLIF(attributes->>'patchVersion', ''), '0')::int AS "patchVersion", +attributes->>'shardId' AS "shard", +attributes->'stats'->>'endGameReason' AS "result", +attributes->'stats'->>'queue' AS "queue", + +false AS "anyAFK", +'' AS "winningTeam", +0 AS "krakenCaptures", +0 AS "laneMinionsSlayed", +0 AS "jungleMinionsSlayed", +0 AS "heroDeaths" + +FROM apidata WHERE type='match' -- cgit v1.3.1