query-ef176464ff18e930333754e132b01a82

rq turtle/ttl

Stefan Kühn

Use at

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

{
  # Subquery to get all values of hasc in Germany  
  SELECT ?region ?hasc
  WHERE
  {
    ?region wdt:P8119 ?hasc .
    ?region wdt:P17 wd:Q183 . # country is Germany
  }
  ORDER BY ?hasc
  OFFSET 0
  LIMIT 50
}  ?item wdt:P131 * ?region .
  ?item wdt:P31 / wdt:P279 * wd:Q486972 . # ?item is a subclass of human settlement

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?hasc"):::projected v3("?item"):::projected v2("?region"):::projected a1((" ")) c7(["wd:Q486972"]):::iri c3(["wd:Q183"]):::iri v2 --"wdt:P8119"--> v1 v2 --"wdt:P17"--> c3 v3 --"wdt:P131"--> v2 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c7