query-488c8e94e005c2a85d980ffe1c5553e5

rq turtle/ttl

title: All first level administrative units in Taiwan (should be 22) SELECT DISTINCT ?item ?itemLabel WHERE { VALUES ?type { wd:Q706447 # counties (13) wd:Q2225003 # special municipality (6) wd:Q83020 # provincial city (3) } ?item wdt:P31 ?type . MINUS { ?item wdt:P576 [] } MINUS { ?item wdt:P1366 [] } MINUS { ?item wdt:P582 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_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 bd: <http://www.bigdata.com/rdf#>
#title: All first level administrative units in Taiwan (should be 22)
SELECT DISTINCT ?item ?itemLabel WHERE {
  VALUES ?type { 
    wd:Q706447 # counties (13)
    wd:Q2225003 # special municipality (6)
    wd:Q83020 # provincial city (3)
    }
  ?item wdt:P31 ?type .
  MINUS { ?item wdt:P576 [] }
  MINUS { ?item wdt:P1366 [] }
  MINUS { ?item wdt:P582 [] }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?itemLabel"):::projected v2("?type") a1((" ")) a2((" ")) a3((" ")) c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?type/] bind0-->v2 bind00(["wd:Q706447"]) bind00 --> bind0 bind01(["wd:Q2225003"]) bind01 --> bind0 bind02(["wd:Q83020"]) bind02 --> bind0 v3 --"wdt:P31"--> v2 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P576"--> a1 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P1366"--> a2 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P582"--> a3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end