query-69fe3e4a55b1c8959035428ea3c89526

rq turtle/ttl

all communes without merged communes SELECT ?item ?itemLabel ?itemDescription WHERE { ?item wdt:P31 wd:Q2919801. MINUS { ?item wdt:P31 wd:Q2919801; p:P31 [ pq:P582 ?end ]. } MINUS { ?item wdt:P576 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } ORDER BY ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# all communes without merged communes
SELECT ?item ?itemLabel ?itemDescription WHERE {
    ?item wdt:P31 wd:Q2919801.
    MINUS {
    ?item wdt:P31 wd:Q2919801;
      p:P31 [
        pq:P582 ?end
      ].
    }
    MINUS { ?item wdt:P576 [] }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?end") v2("?item"):::projected v1("?itemLabel"):::projected a2((" ")) a1((" ")) c2(["wd:Q2919801"]):::iri c7(["bd:serviceParam"]):::iri c9(["en"]):::literal v2 --"p:direct/P31"--> c2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P31"--> c2 a1 --"p:qualifier/P582"--> v3 v2 --"p:P31"--> a1 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P576"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end