query-6df728a9aed436530120e32410fc8c21

rq turtle/ttl

French Mayors yet? French wikipediaDo we have enough data to replicate the list on A first pass:

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?position ?positionLabel ?jurisdictionLabel ?start
WHERE { 
  ?position wdt:P279* wd:Q382617 .
  ?item p:P39 ?statement FILTER NOT EXISTS { ?statement pq:P582 ?end } .
  ?statement ps:P39 ?position ; pq:P580 ?start .
  OPTIONAL { ?statement pq:P642 ?jurisdiction } .
  OPTIONAL { ?position wdt:P1001 ?jurisdiction } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
}
ORDER BY ?jurisdictionLabel ?start

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?end") v6("?item"):::projected v7("?jurisdiction") v1("?jurisdictionLabel"):::projected v5("?position"):::projected v2("?start"):::projected v3("?statement") c10(["bd:serviceParam"]):::iri c3(["wd:Q382617"]):::iri c12(["fr"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P582"--> e0v2 e0v2("?end"):::projected e0v1("?statement"):::projected end f0--EXISTS--> f0e0 f0 --> v3 f0 --> c1 f0 --> v4 v3 --"p:qualifier/P582"--> v4 v5 --"p:direct/P279"--> c3 v6 --"p:P39"--> v3 v3 --"p:statement/P39"--> v5 v3 --"p:qualifier/P580"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P642".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1001".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end