fixed query
This commit is contained in:
@@ -170,8 +170,8 @@ public class Routes {
|
|||||||
com.postdate,
|
com.postdate,
|
||||||
com.postlocation[0],
|
com.postlocation[0],
|
||||||
com.postlocation[1],
|
com.postlocation[1],
|
||||||
(SELECT count(*) FROM reaction WHERE reaction.post = com.child AND positive = TRUE) AS positive,
|
(SELECT count(*) FROM reactions WHERE reactions.post = com.child AND reactions.positive = TRUE) AS positive,
|
||||||
(SELECT count(*) FROM reaction WHERE reaction.post = com.child AND positive = FALSE) AS negative
|
(SELECT count(*) FROM reactions WHERE reactions.post = com.child AND reactions.positive = FALSE) AS negative
|
||||||
FROM
|
FROM
|
||||||
(SELECT * FROM comments inner join posts ON comments.child = posts.id) com
|
(SELECT * FROM comments inner join posts ON comments.child = posts.id) com
|
||||||
inner join targets ON targets.id = com.parent
|
inner join targets ON targets.id = com.parent
|
||||||
|
|||||||
Reference in New Issue
Block a user