query-4df1cc3850046dc1906dcd345ddb96fe

rq turtle/ttl

Takes 30 s, while

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item WHERE {

  VALUES ?classes {
    wd:Q1785071  # fort
  #  wd:Q56344492 # artillery battery
  }

  ?item wdt:P31/wdt:P279* ?classes.

  ?item wdt:P17 wd:Q145.
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?classes") v2("?item"):::projected a1((" ")) c4(["wd:Q145"]):::iri bind0[/VALUES ?classes/] bind0-->v1 bind00(["wd:Q1785071"]) bind00 --> bind0 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v1 v2 --"wdt:P17"--> c4