query-94ab984140b777cfff62b017d3d32abf
TODO
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 prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?regionLabel ?regionRefUrl ?inAdminLabel ?inAdminRefUrl
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
?item wdt:P31 wd:Q6083496.
?item p:P150 ?regionStatement.
?regionStatement ps:P150 ?region.
?regionStatement prov:wasDerivedFrom ?regionRef.
?regionRef pr:P854 ?regionRefUrl.
?region p:P131 ?inAdminStatement.
?inAdminStatement ps:P131 ?inAdmin.
?inAdminStatement prov:wasDerivedFrom ?inAdminStatementRef.
?inAdminStatementRef pr:P854 ?inAdminRefUrl.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?inAdmin")
v9("?inAdminRefUrl"):::projected
v6("?inAdminStatement")
v8("?inAdminStatementRef")
v1("?item"):::projected
v3("?region")
v4("?regionRef")
v5("?regionRefUrl"):::projected
v2("?regionStatement")
c2(["bd:serviceParam"]):::iri
c4(["en"]):::literal
c6(["wd:Q6083496"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:direct/P31"--> c6
v1 --"p:P150"--> v2
v2 --"p:statement/P150"--> v3
v2 --"prov:wasDerivedFrom"--> v4
v4 --"p:reference/P854"--> v5
v3 --"p:P131"--> v6
v6 --"p:statement/P131"--> v7
v6 --"prov:wasDerivedFrom"--> v8
v8 --"p:reference/P854"--> v9