fixed query

This commit is contained in:
2024-06-07 19:06:41 +02:00
parent 02d7facd4c
commit c151fb8320

View File

@@ -152,8 +152,8 @@ public class Routes {
posts.postdate,
posts.postlocation[0] AS longitude,
posts.postlocation[1] AS latitude,
(SELECT count(*) FROM reaction WHERE reaction.post = posts.id AND positive = TRUE) AS positive,
(SELECT count(*) FROM reaction WHERE reaction.post = posts.id AND positive = FALSE) AS negative
(SELECT count(*) FROM reactions WHERE reactions.post = posts.id AND reactions.positive = TRUE) AS positive,
(SELECT count(*) FROM reactions WHERE reactions.post = posts.id AND reactions.positive = FALSE) AS negative
FROM
posts
WHERE