diff options
| author | Kapil Viren Ahuja <kvahuja@users.noreply.github.com> | 2017-02-19 17:04:35 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-19 17:04:35 +0530 |
| commit | 7eb07c0ccf2f464e3936b24136e41471ff1c1ff7 (patch) | |
| tree | c117aecbc2276c875edd7a328f15ea872c1c8b64 /queries/roster.sql | |
| parent | eaf6b29760f13040444707eecf9c342c67bd6ffb (diff) | |
| parent | d940ad82f7e34576bf6cc6b8a93cbc298765315e (diff) | |
| download | shrinker-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.tar.gz shrinker-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.zip | |
Merge pull request #14 from vainglorygame/features/web-db-model-refactoring
Features web db model refactoring
Diffstat (limited to 'queries/roster.sql')
| -rw-r--r-- | queries/roster.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/queries/roster.sql b/queries/roster.sql new file mode 100644 index 0000000..b5c4dff --- /dev/null +++ b/queries/roster.sql @@ -0,0 +1,17 @@ +SELECT + +id AS "apiId", +(attributes->'stats'->>'acesEarned')::int AS "acesEarned", +(attributes->'stats'->>'gold')::int AS "gold", +(attributes->'stats'->>'heroKills')::int AS "heroKills", +(attributes->'stats'->>'krakenCaptures')::int AS "krakenCaptures", +attributes->'stats'->>'side' AS "side", +attributes->'stats'->>'side' AS "teamColor", +(attributes->'stats'->>'turretKills')::int AS "turretKills", +(attributes->'stats'->>'turretsRemaining')::int AS "turretsRemaining", + +relationships->'participants'->'data'->0->>'id' AS "participant_1", +relationships->'participants'->'data'->1->>'id' AS "participant_2", +relationships->'participants'->'data'->2->>'id' AS "participant_3" + +FROM roster |
