WHERE (props='' OR props='{}' OR props='{"disable_group_highlight":true}') AND posts.id in (SELECT postid FROM (
SELECT count(*) AS cnt, postid, channels.id, posts.userid FROM reactions
JOIN posts ON (postid=posts.id) JOIN channels ON (posts.channelid=channels.id) left JOIN teams ON (teams.id=channels.teamid)
WHERE (props='' OR props='{}' OR props='{"disable_group_highlight":true}') AND posts.id in (SELECT postid FROM (
SELECT count(*) AS cnt, postid, channels.id, posts.userid FROM reactions
JOIN posts ON (postid=posts.id) JOIN channels ON (posts.channelid=channels.id) left JOIN teams ON (teams.id=channels.teamid)