query-82c674c7e414f92b39cefc4a83276578
title:Kulturdenkmale einer Straße in Dresden mit altesdresden-Property (real und guessing)
SELECT ?houseLabel ?qs
WHERE
{
?street wdt:P8710 "08102". #Dresden Street ID
?house wdt:P669 ?street.
?house p:P669 [ pq:P670 ?housenumber ].
optional {
?house wdt:P11855 ?id
}
?street rdfs:label ?label_de.
filter (lang(?label_de) = "de").
FILTER( strlen( ?housenumber ) =2)
BIND(concat(SUBSTR(STR(?house),32,12),'##P11855##"baut0',STR(?housenumber),'"##P1480##Q18122778') as ?qs)
MINUS {
?house wdt:P11855 []
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?qs
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Kulturdenkmale einer Straße in Dresden mit altesdresden-Property (real und guessing)
SELECT ?houseLabel ?qs
WHERE
{
?street wdt:P8710 "08102". #Dresden Street ID
?house wdt:P669 ?street.
?house p:P669 [ pq:P670 ?housenumber ].
optional {
?house wdt:P11855 ?id
}
?street rdfs:label ?label_de.
filter (lang(?label_de) = "de").
FILTER( strlen( ?housenumber ) =2)
BIND(concat(SUBSTR(STR(?house),32,12),'##P11855##"baut0',STR(?housenumber),'"##P1480##Q18122778') as ?qs)
MINUS {
?house wdt:P11855 []
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?qs
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?house")
v2("?housenumber")
v6("?id")
v3("?label_de")
v7("?qs"):::projected
v4("?street")
a2((" "))
a1((" "))
c11(["bd:serviceParam"]):::iri
c4(["08102"]):::literal
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["string-length(?housenumber) = '2^^xsd:integer'"]]
f0 --> v2
f1[["?label_de = 'de'"]]
f1 --> v3
v4 --"p:direct/P8710"--> c4
v5 --"p:direct/P669"--> v4
a1 --"p:qualifier/P670"--> v2
v5 --"p:P669"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P11855".-> v6
end
v4 --"rdfs:label"--> v3
bind2[/"concat(substring(str(?house),'32^^xsd:integer','12^^xsd:integer'),'##P11855##"baut0',str(?housenumber),'"##P1480##Q18122778')"/]
v5 --o bind2
v2 --o bind2
bind2 --as--o v7
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v5 --"p:direct/P11855"--> a2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end