aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-19 10:05:43 +0200
committerJochen Topf <jochen@topf.org>2014-09-19 10:05:43 +0200
commit5077b329d6e1c90ca7735c17f8ab49d43808f20e (patch)
tree45f2d2e152606988c59c866e913bb9357f6cb00d
parent393e11f721c526b46c6da3c12d6b10583b3ff959 (diff)
downloadtaginfo-5077b329d6e1c90ca7735c17f8ab49d43808f20e.tar
taginfo-5077b329d6e1c90ca7735c17f8ab49d43808f20e.tar.gz
Set number of projects using a tag in top_tags table.
-rw-r--r--sources/master/master.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/master/master.sql b/sources/master/master.sql
index b77ebb5..5397a4c 100644
--- a/sources/master/master.sql
+++ b/sources/master/master.sql
@@ -96,6 +96,8 @@ UPDATE top_tags SET
UPDATE top_tags SET in_wiki=1 WHERE skey || '=' || svalue IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*');
UPDATE top_tags SET in_wiki_en=1 WHERE skey || '=' || svalue IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*' AND lang='en');
+UPDATE top_tags SET in_projects=(SELECT num FROM projects.project_counts p WHERE p.key=skey AND p.value=svalue);
+
CREATE UNIQUE INDEX top_tags_key_value_idx ON top_tags (skey, svalue);
-- ============================================================================