diff options
Diffstat (limited to 'sources/master')
-rw-r--r-- | sources/master/interesting_relation_types.sql | 29 | ||||
-rwxr-xr-x | sources/master/update.sh | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sources/master/interesting_relation_types.sql b/sources/master/interesting_relation_types.sql new file mode 100644 index 0000000..18aab2d --- /dev/null +++ b/sources/master/interesting_relation_types.sql @@ -0,0 +1,29 @@ +-- ============================================================================ +-- +-- Taginfo +-- +-- interesting_relation_types.sql +-- +-- ============================================================================ + +.bail ON + +ATTACH DATABASE '__DIR__/db/taginfo-db.db' AS db; + +-- ============================================================================ + +DROP TABLE IF EXISTS interesting_relation_types; +CREATE TABLE interesting_relation_types ( + rtype TEXT +); + +INSERT INTO interesting_relation_types (rtype) + SELECT value FROM db.tags WHERE key='type' AND count_relations > 100; + +ANALYZE interesting_relation_types; + +.output __DIR__/db/interesting_relation_types.lst + +SELECT rtype FROM interesting_relation_types ORDER BY rtype; + +-- ============================================================================ diff --git a/sources/master/update.sh b/sources/master/update.sh index e3f5413..99d16b0 100755 --- a/sources/master/update.sh +++ b/sources/master/update.sh @@ -30,6 +30,7 @@ rm -f $DATABASE sqlite3 $DATABASE <languages.sql perl -pe "s|__DIR__|$DIR|" master.sql | sqlite3 $DATABASE perl -pe "s|__DIR__|$DIR|" interesting_tags.sql | sqlite3 $DATABASE +perl -pe "s|__DIR__|$DIR|" interesting_relation_types.sql | sqlite3 $DATABASE echo "`$DATECMD` Done master." |