XenForo SQL Query Help: Count "Helpful" Posts Per Member Specific Node With Reactions

ProWeb

Enthusiast
Joined
Feb 20, 2008
Messages
225
I'm a SQL dummy, but I have grand ideas of how to use the wealth of knowledge in our forum!

... I just need help with the queries :)

Here's what I'd like to do: Count the number of times members have posted "helpful" replies (based on # of reactions) in a specific node (forum).

Here's the incorrect thing I'm trying to do:

Code:
SELECT user_id, COUNT(*) AS number_helpful_posts
FROM xf_post
WHERE thread_node = 5
AND #post_reactions >2
GROUP BY user_id
ORDER BY 'number_helpful_posts' DESC

Can a SQL master clean that up with the proper joins, etc?

THANK YOU!!!
 
Top