diff options
author | Yorhel <git@yorhel.nl> | 2009-11-14 18:51:33 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-14 18:53:43 +0100 |
commit | 2c6f62c89c93dbb5ec757c11f2af38534f2c760a (patch) | |
tree | 6fb761d24851af32cedf5749d9f3401f37f1c043 /util | |
parent | 151a8338c931389c6d67389c56c2d8862e882de6 (diff) |
SQL: Don't count users with ign_votes in bayesian rating
They still have influence on the average number of votes per VN and the
overall average vote, but this isn't significant. (at least, not at the
moment)
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/update_2.9.sql | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/updates/update_2.9.sql b/util/updates/update_2.9.sql index 0720681e..cbf6af63 100644 --- a/util/updates/update_2.9.sql +++ b/util/updates/update_2.9.sql @@ -50,7 +50,7 @@ UPDATE vn SET c_rating = (SELECT ( ((SELECT COUNT(vote)::real/COUNT(DISTINCT vid)::real FROM votes)*(SELECT AVG(vote)::real FROM votes) + SUM(vote)::real) / ((SELECT COUNT(vote)::real/COUNT(DISTINCT vid)::real FROM votes) + COUNT(uid)::real) - ) FROM votes WHERE vid = id + ) FROM votes WHERE vid = id AND uid NOT IN(SELECT id FROM users WHERE ign_votes) ), - c_votecount = COALESCE((SELECT count(*) FROM votes WHERE vid = id), 0); + c_votecount = COALESCE((SELECT count(*) FROM votes WHERE vid = id AND uid NOT IN(SELECT id FROM users WHERE ign_votes)), 0); |