query-878c690cc8ea4d79ed9e749a159ac91a
20 regions of Italy
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#>
SELECT ?region ?nuts ?regionLabel ?capitalLabel ?regionTypeLabel WHERE {
?region wdt:P31 ?regionType .
?regionType wdt:P279* wd:Q16110 .
?region wdt:P605 ?nuts . FILTER(STRLEN(?nuts)=4) .
?region wdt:P36 ?capital
SERVICE wikibase:label{bd:serviceParam wikibase:language "it"}
}
ORDER BY ?nuts
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?capital")
v1("?nuts"):::projected
v2("?region"):::projected
v3("?regionType")
c8(["bd:serviceParam"]):::iri
c4(["wd:Q16110"]):::iri
c10(["it"]):::literal
f0[["string-length(?nuts) = '4^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> v3
v3 --"wdt:P279"--> c4
v2 --"wdt:P605"--> v1
v2 --"wdt:P36"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end