query-43947e751cfe8a54bee7725e79b2a152
...as a Map
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?w ?wLabel ?geo
WHERE
{
{
?w wdt:P463 wd:Q105757481 .
} UNION {
?p wdt:P31 wd:Q98270496 .
?p p:P1416 ?statement .
?statement ps:P1416 ?w .
OPTIONAL { ?statement pq:P3831 ?affiliationType .}
}
BIND(IF(! Bound(?affiliationType), "Vereinsmitglied", ?affiliationTypeLabel) AS ?affiliationTypeLabel)
{?w wdt:P625 ?geo} UNION {?w wdt:P159 ?hauptverwaltung . ?hauptverwaltung wdt:P625 ?geo .} UNION {?w wdt:P131 ?verwaltungseinheit . ?verwaltungseinheit wdt:P625 ?geo .} UNION {?w wdt:P361+ ?parentOrganization . ?parentOrganization wdt:P625 ?geo .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" . }
} ORDER BY ASC(?wLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?affiliationType")
v6("?affiliationTypeLabel")
v7("?geo"):::projected
v8("?hauptverwaltung")
v3("?p")
v10("?parentOrganization")
v4("?statement")
v9("?verwaltungseinheit")
v2("?w"):::projected
v1("?wLabel"):::projected
c2(["wd:Q105757481"]):::iri
c13(["bd:serviceParam"]):::iri
c15(["de,en"]):::literal
c4(["wd:Q98270496"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"p:direct/P31"--> c4
v3 --"p:P1416"--> v4
v4 --"p:statement/P1416"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P3831".-> v5
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P463"--> c2
end
union0r <== or ==> union0l
end
bind0[/"if(not bound(?affiliationType),'Vereinsmitglied',?affiliationTypeLabel)"/]
v5 --o bind0
v6 --o bind0
bind0 --as--o v6
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P361"--> v10
v10 --"p:direct/P625"--> v7
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P131"--> v9
v9 --"p:direct/P625"--> v7
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P159"--> v8
v8 --"p:direct/P625"--> v7
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P625"--> v7
end
union1r <== or ==> union1l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end