diff options
Diffstat (limited to 'queries/match.sql')
| -rw-r--r-- | queries/match.sql | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/queries/match.sql b/queries/match.sql index 0ff0c62..4f82933 100644 --- a/queries/match.sql +++ b/queries/match.sql @@ -1,18 +1,15 @@ SELECT -id AS "match_id", +id AS "apiId", +(attributes->>'createdAt')::timestamp as "createdAt", (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", +COALESCE(NULLIF(attributes->>'patchVersion', ''), '0') AS "patchVersion", +attributes->>'shardId' AS "shardId", +attributes->'stats'->>'endGameReason' AS "endGameReason", attributes->'stats'->>'queue' AS "queue", -false AS "anyAFK", -'' AS "winningTeam", -0 AS "krakenCaptures", -0 AS "laneMinionsSlayed", -0 AS "jungleMinionsSlayed", -0 AS "heroDeaths" +relationships->'rosters'->'data'->0->>'id' as roster_1, +relationships->'rosters'->'data'->1->>'id' as roster_2 FROM match |
