query-3949ac4ba9bdd6ea736a4b5aca4b57ce
SPARQL-Abfrage 3
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?lake ?lake_label ?value ?value_label ?v ?v_label WHERE
{
?lake wdt:P201 ?value ; # beliebiger See hat einen Abfluss
wdt:P31 wd:Q23397 . # ist ein See
OPTIONAL {?lake rdfs:label ?lake_label filter (lang(?lake_label) = "en")}
OPTIONAL {?value rdfs:label ?value_label filter (lang(?value_label) = "en")}
{
SELECT ?value ?v ?v_label
WHERE {
VALUES ?p {wdt:P31 wdt:P885}
?value ?p ?v .# Teile sind ein See und nenne Quelle des Wasserlaufs
OPTIONAL {?v rdfs:label ?v_label filter (lang(?v_label) = "en")}
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?lake"):::projected
v2("?lake_label"):::projected
v6("?p")
v7("?v"):::projected
v5("?v_label"):::projected
v4("?value"):::projected
v1("?value_label"):::projected
c4(["wd:Q23397"]):::iri
v3 --"wdt:P201"--> v4
v3 --"wdt:P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v1
end
bind0[/VALUES ?p/]
bind0-->v6
bind00(["wdt:P31"])
bind00 --> bind0
bind01(["wdt:P885"])
bind01 --> bind0
v4 -->v6--> v7
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v5
end