query-2a2afc455a877cb9092e5754de1052d1
TODO
Use at
- https://query.wikidata.org/sparql
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 ?person ?personLabel ?street ?streetLabel
WHERE
{
{
SELECT ?person ?street
WHERE
{
?person wdt:P31 wd:Q5. # Is a human
?person wdt:P551/wdt:P669? ?street. # Lives/lived in this place
?street wdt:P17 wd:Q183. # in Germany
?street wdt:P131+ wd:Q64. # ... located in Berlin
?street wdt:P31/wdt:P279* wd:Q34442. # ... which must be a street
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,en".}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?person"):::projected
v2("?street"):::projected
a1((" "))
a2((" "))
c8(["wd:Q64"]):::iri
c10(["wd:Q34442"]):::iri
c12(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c6(["wd:Q183"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,de,en"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P551"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P669"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
v2 --"wdt:P17"--> c6
v2 --"wdt:P131"--> c8
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end