query-8abbb558387e298506147678e00adf87

rq turtle/ttl

Schulen in Hannover

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#>
SELECT DISTINCT ?Schule ?SchuleLabel ?Geo ?NamensgeberLabel ?CommonsCat_Link ?layer
WHERE
{
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
  VALUES ?instance_of {
    wd:Q99460083 # Grundschule
    wd:Q675423 # Hauptschule
    wd:Q667471 # Realschule
    wd:Q682697 # Gesamtschule
    wd:Q1668867 # Oberschule
    wd:Q1542966 # Gymnasium
  } 
  ?Schule wdt:P31 ?instance_of ;
          wdt:P131* wd:Q1715 ;
          wdt:P625 ?Geo .
  OPTIONAL {
    ?Schule wdt:P373 ?CommonsCat .
    BIND(IRI(CONCAT("https://commons.wikimedia.org/wiki/Category:", ?CommonsCat)) AS ?CommonsCat_Link) .
  }
  OPTIONAL {
    ?Schule wdt:P138 ?Namensgeber .
  }
}
ORDER BY ASC ( ?SchuleLabel )

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?CommonsCat") v6("?CommonsCat_Link"):::projected v4("?Geo"):::projected v7("?Namensgeber") v3("?Schule"):::projected v1("?SchuleLabel"):::projected v2("?instance_of") c4(["#91;AUTO_LANGUAGE#93;,de"]):::literal c2(["bd:serviceParam"]):::iri c7(["wd:Q1715"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end bind0[/VALUES ?instance_of/] bind0-->v2 bind00(["wd:Q99460083"]) bind00 --> bind0 bind01(["wd:Q675423"]) bind01 --> bind0 bind02(["wd:Q667471"]) bind02 --> bind0 bind03(["wd:Q682697"]) bind03 --> bind0 bind04(["wd:Q1668867"]) bind04 --> bind0 bind05(["wd:Q1542966"]) bind05 --> bind0 v3 --"wdt:P31"--> v2 v3 --"wdt:P131"--> c7 v3 --"wdt:P625"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P373".-> v5 bind1[/"concat('https://commons.wikimedia.org/wiki/Category:',?CommonsCat)"/] v5 --o bind1 bind1 --as--o v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P138".-> v7 end