The voting for a pretty hefty competition was foolishly run through a poll on a forum I administrate. The unfortunate result was of course that people signed up for multiple accounts to vote on the poll more than once.
Through executing an SQL query, would there be a way of me getting results of the poll based on unique IP addresses, or only counting people who have a postcount greater than 0?
SELECT pr.response, COUNT(*)
FROM xf_poll_vote AS pv
LEFT JOIN xf_poll_response AS pr ON (pr.poll_response_id = pv.poll_response_id)
LEFT JOIN xf_user AS u ON (u.user_id = pv.user_id)
WHERE pv.poll_id = 1
AND u.message_count > 0
GROUP BY pv.poll_response_id
You need to specify the pollid (WHERE pv.poll_id = 1).