query-4dd59223949ac901871bbe21194a4f40

rq turtle/ttl

Provinces, the next query consider all of them. (Q21190155)free municipal consortium and (Q15110)metropolitan city of Italy have been replaced by (Q15089)province of Italy . Since 2016 some provincesEach region is administratively divided in 102 Provinces. (Q21190155)free municipal consortium and 6 (Q15110)metropolitan city of Italy , 14 (Q15089)province of Italy , the next query considers all of them. As of today there are 106 administrative entities: 86 (Q21190155)free municipal consortium and (Q15110)metropolitan city of Italy have been replaced by (Q15089)province of Italy . Since 2016 some provincesEach region is administratively divided in

Use at

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Italia: regions, provinces
#defaultView:Tree
SELECT ?italiaLabel ?regione ?regioneLabel ?provincia ?provinciaLabel ?comune ?comuneLabel
WHERE 
{
  ?regione p:P31/ps:P31/wdt:P279* wd:Q16110 .    # Regions of Italia
  ?provincia wdt:P131 ?regione .                 # Administrative divisions in the region

  { ?provincia wdt:P31 wd:Q15089 . }             # List of provinces

  UNION
  { ?provincia wdt:P31 wd:Q15110 . }             # metropolitan cities of Italy

  UNION
  { ?provincia wdt:P31 wd:Q21190155 . }          # Liberi consorzi comunali of Sicily

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?provincia"):::projected v1("?regione"):::projected a1((" ")) a2((" ")) c9(["wd:Q21190155"]):::iri c11(["bd:serviceParam"]):::iri c4(["wd:Q16110"]):::iri c8(["wd:Q15110"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q15089"]):::iri v1 --"p:P31"--> a1 a1 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> c4 v2 --"p:direct/P131"--> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P31"--> c9 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P31"--> c8 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P31"--> c7 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end