summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-18 18:06:14 +0200
committerYorhel <git@yorhel.nl>2009-10-18 18:06:14 +0200
commit62cb41c3b8780bffe5a8ea58a6a7b5053d9e1059 (patch)
tree46d3cf89bb4149b014f970f117ba195342269fcf /util/dump.sql
parentee96a4381fa187eede8374601d0c06cd861eb66c (diff)
SQL: Fixed calculation of tags_vn_bayesian.spoiler
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql
index 145c09e8..9fbff0a2 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -589,7 +589,7 @@ BEGIN
SELECT * FROM tags_vn UNION SELECT * FROM tag_vn_childs();
-- grouped by (tag, vid, uid), so only one user votes on one parent tag per VN entry
CREATE OR REPLACE TEMPORARY VIEW tags_vn_grouped AS
- SELECT tag, vid, uid, MAX(vote)::real AS vote, COALESCE(AVG(spoiler), 0)::real AS spoiler
+ SELECT tag, vid, uid, MAX(vote)::real AS vote, AVG(spoiler)::real AS spoiler
FROM tags_vn_all GROUP BY tag, vid, uid;
-- grouped by (tag, vid) and serialized into a table
DROP INDEX IF EXISTS tags_vn_bayesian_tag;