query-73be66e40c27a38c8a354a75bff6e9d5

rq turtle/ttl

Propertiessubclass of (P279)instance of (P31)located in the administrative territorial entity (P131)

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/>
SELECT DISTINCT ?commune ?canton ?qualProp ?time ?precision ?timezone ?calendar WHERE {
  ?commune p:P31/ps:P31/wdt:P279* wd:Q484170 .
  ?commune p:P131 ?cantonStmt .
  ?cantonStmt ps:P131 ?canton .
  ?canton wdt:P31 ?cantonType .
  VALUES ?cantonType { wd:Q18524218 wd:Q184188 } .
  OPTIONAL {
    ?cantonStmt ?qualifier ?qualVal .
    ?qualProp wikibase:qualifierValue ?qualifier .
    ?qualVal wikibase:timePrecision ?precision ;
             wikibase:timeValue ?time ;
             wikibase:timeTimezone ?timezone ;
             wikibase:timeCalendarModel ?calendar ;
  }
}
ORDER BY ASC(?commune) ASC(?canton)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?calendar"):::projected v2("?canton"):::projected v3("?cantonStmt") v5("?cantonType") v1("?commune"):::projected v8("?precision"):::projected v7("?qualProp"):::projected v6("?qualVal") v5("?qualifier") v9("?time"):::projected v10("?timezone"):::projected a1((" ")) a2((" ")) c4(["wd:Q484170"]):::iri v1 --"p:P31"--> a1 a1 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> c4 v1 --"p:P131"--> v3 v3 --"p:statement/P131"--> v2 v2 --"p:direct/P31"--> v5 bind0[/VALUES ?cantonType/] bind0-->v5 bind00(["wd:Q18524218"]) bind00 --> bind0 bind01(["wd:Q184188"]) bind01 --> bind0 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -->v5--> v6 v7 -."wikibase:qualifierValue".-> v5 v6 --"wikibase:timePrecision"--> v8 v6 --"wikibase:timeValue"--> v9 v6 --"wikibase:timeTimezone"--> v10 v6 --"wikibase:timeCalendarModel"--> v11 end