blob: e2e795458cdfea84cccad4d0a948eeb492036cce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-- ============================================================================
--
-- 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
);
-- MIN_COUNT_RELATIONS_PER_TYPE setting: sources.master.min_count_relations_per_type
INSERT INTO interesting_relation_types (rtype)
SELECT value FROM db.tags WHERE key='type' AND count_relations > __MIN_COUNT_RELATIONS_PER_TYPE__;
ANALYZE interesting_relation_types;
.output __DIR__/db/interesting_relation_types.lst
SELECT rtype FROM interesting_relation_types ORDER BY rtype;
-- ============================================================================
|