This query will return the number of likes for the specified content_user_id:
Rich (BB code):
SELECT content_user_id, COUNT(*) AS likes
FROM xf_liked_content
WHERE content_user_id = 1
GROUP BY content_user_id;
This query will return the number of trophy points for the specified user_id:
Rich (BB code):
SELECT SUM(t.trophy_points) AS tpoints
FROM xf_user_trophy AS ut
LEFT JOIN xf_trophy AS t ON (t.trophy_id = ut.trophy_id)
WHERE ut.user_id = 1;