You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
insert into blog(owner_id, name, description, created_at)
33
33
values
34
-
((select id from account where email ilike 'a%'), 'A: Blog 1', 'a desc1', now()),
35
-
((select id from account where email ilike 'a%'), 'A: Blog 2', 'a desc2', now()),
36
-
((select id from account where email ilike 'a%'), 'A: Blog 3', 'a desc3', now()),
37
-
((select id from account where email ilike 'b%'), 'B: Blog 3', 'b desc1', now());
34
+
((select id from account where email ilike 'a%'), 'A: Blog 1', 'a desc1', NOW() - INTERVAL '10 days'),
35
+
((select id from account where email ilike 'a%'), 'A: Blog 2', 'a desc2', NOW() - INTERVAL '9 days'),
36
+
((select id from account where email ilike 'a%'), 'A: Blog 3', 'a desc3', NOW() - INTERVAL '8 days'),
37
+
((select id from account where email ilike 'b%'), 'B: Blog 3', 'b desc1', NOW() - INTERVAL '7 days');
38
38
insert into blog_post (blog_id, title, body, tags, status, created_at)
39
39
values
40
-
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 1 in A Blog 1', 'Content for post 1 in A Blog 1', '{"tech", "update"}', 'RELEASED', NOW()),
41
-
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 2 in A Blog 1', 'Content for post 2 in A Blog 1', '{"announcement", "tech"}', 'PENDING', NOW()),
42
-
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 1 in A Blog 2', 'Content for post 1 in A Blog 2', '{"personal"}', 'RELEASED', NOW()),
43
-
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 2 in A Blog 2', 'Content for post 2 in A Blog 2', '{"update"}', 'RELEASED', NOW()),
44
-
((SELECT id FROM blog WHERE name = 'A: Blog 3'), 'Post 1 in A Blog 3', 'Content for post 1 in A Blog 3', '{"travel", "adventure"}', 'PENDING', NOW()),
45
-
((SELECT id FROM blog WHERE name = 'B: Blog 3'), 'Post 1 in B Blog 3', 'Content for post 1 in B Blog 3', '{"tech", "review"}', 'RELEASED', NOW()),
40
+
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 1 in A Blog 1', 'Content for post 1 in A Blog 1', '{"tech", "update"}', 'RELEASED', NOW() - INTERVAL '30 days'),
41
+
((SELECT id FROM blog WHERE name = 'A: Blog 1'), 'Post 2 in A Blog 1', 'Content for post 2 in A Blog 1', '{"announcement", "tech"}', 'PENDING', NOW() - INTERVAL '25 days'),
42
+
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 1 in A Blog 2', 'Content for post 1 in A Blog 2', '{"personal"}', 'RELEASED', NOW() - INTERVAL '20 days'),
43
+
((SELECT id FROM blog WHERE name = 'A: Blog 2'), 'Post 2 in A Blog 2', 'Content for post 2 in A Blog 2', '{"update"}', 'RELEASED', NOW() - INTERVAL '15 days'),
44
+
((SELECT id FROM blog WHERE name = 'A: Blog 3'), 'Post 1 in A Blog 3', 'Content for post 1 in A Blog 3', '{"travel", "adventure"}', 'PENDING', NOW() - INTERVAL '10 days'),
45
+
((SELECT id FROM blog WHERE name = 'B: Blog 3'), 'Post 1 in B Blog 3', 'Content for post 1 in B Blog 3', '{"tech", "review"}', 'RELEASED', NOW() - INTERVAL '5 days'),
46
46
((SELECT id FROM blog WHERE name = 'B: Blog 3'), 'Post 2 in B Blog 3', 'Content for post 2 in B Blog 3', '{"coding", "tutorial"}', 'PENDING', NOW());
47
47
comment on table blog_post is e'@graphql({"totalCount": {"enabled": true}})';
{"data": null, "errors": [{"message": "UUID fields (like \"id\") are not supported for min/max aggregation because they don't have a meaningful natural ordering"}]}
406
+
(1 row)
407
+
408
+
-- Test Case 16: Edge case - Empty result set with aggregates
{"data": {"blogPostCollection": {"edges": [{"node": {"title": "Post 2 in A Blog 1"}}, {"node": {"title": "Post 1 in A Blog 3"}}], "aggregate": {"max": {"createdAt": "2025-05-02T22:04:39.666373"}, "min": {"createdAt": "2025-04-02T22:04:39.666373"}, "count": 7}}}}
0 commit comments