query-0f37bf214a0285ea9384eef0fc0bc22d
Rivières du bassin de la Rupert SELECT Distinct ?id ?idLabel ?confluentLabel ?long ?link WHERE {
{ ?id (wdt:P403|wdt:P201)* wd:Q427437} # Double vérification
{?id wdt:P4614* wd:Q115301609} ?id wdt:P31 wd:Q4022 . ?id wdt:P403 ?confluent . Optional { ?id wdt:P2043 ?long }
filter (?long >20) .
filter not exists { ?id wdt:P402 ?osm }
SERVICE wikibase:label {bd:serviceParam wikibase:language "fr,en" . } OPTIONAL { ?link schema:about ?id . ?link schema:isPartOf https://fr.wikipedia.org/ . } } order by DESC(?long)
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Rivières du bassin de la Rupert
SELECT Distinct ?id ?idLabel ?confluentLabel ?long ?link WHERE {
# { ?id (wdt:P403|wdt:P201)* wd:Q427437} # Double vérification
{?id wdt:P4614* wd:Q115301609}
?id wdt:P31 wd:Q4022 .
?id wdt:P403 ?confluent .
Optional { ?id wdt:P2043 ?long }
# filter (?long >20) .
# filter not exists { ?id wdt:P402 ?osm }
SERVICE wikibase:label {bd:serviceParam wikibase:language "fr,en" . }
OPTIONAL {
?link schema:about ?id .
?link schema:isPartOf <https://fr.wikipedia.org/> .
}
}
order by DESC(?long)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?confluent")
v2("?id"):::projected
v4("?link"):::projected
v1("?long"):::projected
c13([https://fr.wikipedia.org/]):::iri
c8(["bd:serviceParam"]):::iri
c2(["wd:Q115301609"]):::iri
c4(["wd:Q4022"]):::iri
c10(["fr,en"]):::literal
v2 --"wdt:P4614"--> c2
v2 --"wdt:P31"--> c4
v2 --"wdt:P403"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2043".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
v4 --"schema:isPartOf"--> c13
end