-
Notifications
You must be signed in to change notification settings - Fork 11
/
wikidata_sparql_queries.txt
67 lines (56 loc) · 1.93 KB
/
wikidata_sparql_queries.txt
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# download as .tsv. Remove first line and "http://www.wikidata.org/entity/" prefixes.
#Properties of type external-id
# Make a list of properties of the type external-id
SELECT ?property ?propertyLabel WHERE {
?property wikibase:propertyType wikibase:ExternalId .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
# Properties that could be mapped to so:containedInPlace
SELECT ?property ?propertyLabel WHERE {
?property wdt:P1647* wd:P361 . # P1647: subproperty of, P361: part of
?property wdt:P1647* wd:P276 . # P1647: subproperty of, P276: location
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
# Properties that could be mapped to so:containsPlace
SELECT ?property ?propertyLabel WHERE {
?property wdt:P1696 ?property2 . # P1696: inverse of
?property2 wdt:P1647* wd:P131 . # P1647: subproperty of, P361: part of
?property2 wdt:P1647* wd:P276 . # P1647: subproperty of, P276: location
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
# temporal properties
SELECT ?property ?propertyLabel WHERE {
?property wdt:P31+ wd:Q18636219 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
# Location properties
SELECT ?property ?propertyLabel WHERE {
?property wdt:P31+ wd:Q18615777 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
--- Others (not needed any more) ---
# All properties with their names
SELECT ?property ?propertyLabel
WHERE {
hint:Query hint:optimizer "None" .
?property a wikibase:Property .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
# Properties with "instance of" "Wikidata property for authority control"
SELECT ?property ?propertyLabel WHERE {
?property a wikibase:Property .
?property wd:P31 wd:Q18614948 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}