summaryrefslogtreecommitdiff
path: root/queries/recent-matches.sql
diff options
context:
space:
mode:
Diffstat (limited to 'queries/recent-matches.sql')
-rw-r--r--queries/recent-matches.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/queries/recent-matches.sql b/queries/recent-matches.sql
index fb237d7..9295813 100644
--- a/queries/recent-matches.sql
+++ b/queries/recent-matches.sql
@@ -1,7 +1,7 @@
-SELECT ARRAY_TO_JSON(ARRAY(
+SELECT ARRAY_TO_JSON(ARRAY(
SELECT
JSONB_BUILD_OBJECT(
- 'id', match.data->>'id',
+ 'id', (match.data->'attributes'->>'shardId') || (match.data->>'id'),
'date', match.data->'attributes'->>'createdAt',
'duration', CAST(
match.data->'attributes'->>'duration'
@@ -27,4 +27,4 @@ SELECT
)
FROM match
ORDER BY match.data->'attributes'->>'createdAt' DESC
-)) AS data
+)) AS data; \ No newline at end of file