query-bc34b8305fa2ac2535dc9d35abb1c0e3
BStGS locations SELECT ?item ?itemLabel WHERE { { ?item wdt:P361 wd:Q812285 . # parts of BStGS } UNION { ?item wdt:P361 ?sub1 . # parts of ?sub1 wdt:P361 wd:Q812285 . # parts of BStGS } SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,it,es,pt,ca" . } }
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 bd: <http://www.bigdata.com/rdf#>
# BStGS locations
SELECT ?item ?itemLabel WHERE {
{
?item wdt:P361 wd:Q812285 . # parts of BStGS
} UNION {
?item wdt:P361 ?sub1 . # parts of
?sub1 wdt:P361 wd:Q812285 . # parts of BStGS
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,it,es,pt,ca" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?sub1")
c4(["bd:serviceParam"]):::iri
c2(["wd:Q812285"]):::iri
c6(["en,de,fr,it,es,pt,ca"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P361"--> v2
v2 --"wdt:P361"--> c2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P361"--> c2
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end