summaryrefslogtreecommitdiff
path: root/queries/match.sql
blob: 5dfa692a8f10f0f9d66deb288f57fd1ad56911ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SELECT

id AS "apiId",
(attributes->>'createdAt')::timestamp as "createdAt",
(attributes->>'duration')::int AS "duration",
attributes->>'gameMode' AS "gameMode",
COALESCE(NULLIF(attributes->>'patchVersion', ''), '0') AS "patchVersion",
attributes->>'shardId' AS "shardId",
attributes->'stats'->>'endGameReason' AS "endGameReason",
attributes->'stats'->>'queue' AS "queue" --,

--relationships->'rosters'->'data'->0->>'id' as "roster_1",
--relationships->'rosters'->'data'->1->>'id' as "roster_2"

FROM "match"