Dikiyoba, on 12 December 2012 - 05:22 PM, said:
Also, the only option for adding a dislike feature makes likes and dislikes anonymous, so we wouldn't be able to have statistics on it at all.
Actually, no. It would just not display them publicly, the information has
to be stored, otherwise users would be able to downvote something to oblivion relatively easily. If you look at the database, all reputation things are stored in reputation_index. You might also find core_like interesting, it's what seems to handle the display of who liked things, but doesn't do anything besides caching, as I discovered after two hours of SQLing.
For reference, here's the SQL I used for my data.
select author_name, count(id) as likes, n_posts, count(id)/n_posts as lpp from
(select * from reputation_index left join posts on posts.pid = reputation_index.type_id where type='pid') as likes join
(select member_id as n_uid, count(pid) as n_posts from posts join members on posts.author_id = members.member_id where post_date > 1350540000 group by author_id) as mposts
on likes.author_id = mposts.n_uid group by author_id order by count(id)/n_posts desc