query-1374dd924fdedf04a12e079b6a4b3c70

rq turtle/ttl

1a. Former hospitals in Regensburg SELECT DISTINCT ?item ?itemLabel ?itemDescription ?closingdate
WHERE { #is or instance of former hospital ?item wdt:P31/wdt:P279* wd:Q64578911; wdt:P131 wd:Q2978. #get closingdate OPTIONAL {?item wdt:P3999 ?closingdate.}

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } order by lcase(?itemLabel) # order a-z

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#>
# 1a. Former hospitals in Regensburg 
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?closingdate  
WHERE {
  #is or instance of former hospital
  ?item wdt:P31/wdt:P279* wd:Q64578911;
       wdt:P131 wd:Q2978.
        #get closingdate
    OPTIONAL {?item wdt:P3999 ?closingdate.}

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by lcase(?itemLabel) # order a-z

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?closingdate"):::projected v2("?item"):::projected v1("?itemLabel"):::projected a1((" ")) c5(["wd:Q2978"]):::iri c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q64578911"]):::iri v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 --"wdt:P131"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P3999".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end