Index: trunk/extensions/ArticleFeedbackv5/sql/filter_count.sql |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | -- oversighted |
14 | 14 | INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'deleted', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND af_is_deleted IS TRUE GROUP BY af_page_id; |
| 15 | +-- unoversighted |
15 | 16 | INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'undeleted', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND af_is_deleted IS FALSE AND af_is_undeleted IS TRUE GROUP BY af_page_id; |
16 | 17 | |
17 | 18 | -- visible (all not hidden) |
— | — | @@ -32,4 +32,4 @@ |
33 | 33 | |
34 | 34 | -- helpful and unhelpful counts |
35 | 35 | INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'helpful', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) > 0 AND af_is_hidden IS FALSE AND af_is_deleted IS FALSE GROUP BY af_page_id; |
36 | | -INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'unhelpful', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) < 0 AND af_is_hidden IS FALSE AND af_is_deleted IS FALSE GROUP BY af_page_id; |
\ No newline at end of file |
| 36 | +INSERT INTO aft_article_filter_count(afc_page_id, afc_filter_name, afc_filter_count) SELECT af_page_id, 'unhelpful', COUNT(*) FROM aft_article_feedback WHERE af_bucket_id = 1 AND CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) < 0 AND af_is_hidden IS FALSE AND af_is_deleted IS FALSE GROUP BY af_page_id; |