query-ff7a067bf1f96a6b7bdafeb479a0a4df

rq turtle/ttl

Objekte erbaut vor 1945, ohne altesdresden

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#---------------------------------------------------------------------------------------
# Objekte erbaut vor 1945, ohne altesdresden
#---------------------------------------------------------------------------------------
#defaultView:Table;Map;
SELECT distinct ?item ?itemLabel ?itemDescription ?erbaut ?streetLabel ?housenumber ?image  ?coordinate
#?value ?valueLabel  (URI(CONCAT("https://www.altesdresden.de/index.htm?get_object=", ?value)) as ?altesDDurl)
WHERE
{
  #?item wdt:P11855 ?value .
  ?item wdt:P131 wd:Q1731.  # in Dresden
  MINUS { ?item wdt:P11855 [] } . # kein altesdresden
  ?item wdt:P571 ?erbaut.         # Erbaut am
  FILTER (?erbaut <= "1946-01-01T00:00:00Z"^^xsd:dateTime)  # vor 1945

  MINUS { ?item wdt:P31 wd:Q3305213 }. # kein Gemälde

  OPTIONAL { ?item wdt:P18 ?image . }
  OPTIONAL { ?item wdt:P625 ?coordinate . }
  OPTIONAL { ?item wdt:P669 ?street.  }                     # Straße
  OPTIONAL { ?item p:P669 [  pq:P670 ?housenumber ]  . }    # Hausnummer  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en"  }
}
order by ?streetLabel ?housenumber ?erbaut

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coordinate"):::projected v3("?erbaut"):::projected v2("?housenumber"):::projected v5("?image"):::projected v4("?item"):::projected v7("?street") v1("?streetLabel"):::projected a1((" ")) a2((" ")) c7(["wd:Q3305213"]):::iri c14(["bd:serviceParam"]):::iri c16(["de,en"]):::literal c3(["wd:Q1731"]):::iri f0[["?erbaut <= '1946-01-01T00:00:00Z^^xsd:dateTime'"]] f0 --> v3 v4 --"p:direct/P131"--> c3 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v4 --"p:direct/P11855"--> a1 end v4 --"p:direct/P571"--> v3 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v4 --"p:direct/P31"--> c7 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P18".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P625".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P669".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:qualifier/P670".-> v2 v4 --"p:P669"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end