Issue in title. Any idea how to fix?
SELECT
dvc.votes_count AS vote_count,
t.id AS topic_id
FROM topics t
INNER JOIN discourse_voting_topic_vote_count dvc ON dvc.topic_id = t.id
INNER JOIN users u ON t.user_id = u.id
INNER JOIN post_actions pa ON pa.user_id = u.id
INNER JOIN users u2 ON pa.user_id = u2.id
WHERE t.category_id = 20
AND u2.trust_level >= 1
GROUP BY dvc.votes_count, t.id, pa.user_id
ORDER BY vote_count DESC