query-29790cd4a8ec079c427635eaa6610113

rq turtle/ttl

Affluents et sous-affluent du Saint-Laurent SELECT DISTINCT ?id ?idLabel ?municipLabel ?mrcLabel ?regionLabel
WHERE { ?id wdt:P31 wd:Q4022 . ?id wdt:P403 wd:Q134750 . ?id wdt:P131 ?municip . ?municip wdt:P131 ?mrc . ?mrc wdt:P131 wd:Q176 . ?mrc wdt:P131 ?region . FILTER NOT EXISTS { ?id wdt:P4614 ?bassin } SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } } ORDER BY ?regionLabel ?mrcLabel ?municipLabel LIMIT 500

Use at

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#>
# Affluents et sous-affluent du Saint-Laurent 
SELECT DISTINCT ?id ?idLabel ?municipLabel ?mrcLabel ?regionLabel  
WHERE 
{
    ?id wdt:P31 wd:Q4022 .
    ?id wdt:P403* wd:Q134750 .
    ?id wdt:P131 ?municip .
    ?municip wdt:P131 ?mrc .
    ?mrc wdt:P131* wd:Q176 .
    ?mrc wdt:P131 ?region .
    FILTER NOT EXISTS { ?id wdt:P4614 ?bassin }
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "fr,en" .
    }
} 
ORDER BY ?regionLabel ?mrcLabel ?municipLabel
LIMIT 500

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?bassin") v4("?id"):::projected v7("?mrc") v2("?mrcLabel"):::projected v6("?municip") v3("?municipLabel"):::projected v8("?region") v1("?regionLabel"):::projected c9(["bd:serviceParam"]):::iri c3(["wd:Q4022"]):::iri c11(["fr,en"]):::literal c5(["wd:Q134750"]):::iri c7(["wd:Q176"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P4614"--> e0v2 e0v2("?bassin"):::projected e0v1("?id"):::projected end f0--EXISTS--> f0e0 f0 --> v4 f0 --> c1 f0 --> v5 v4 --"wdt:P4614"--> v5 v4 --"wdt:P31"--> c3 v4 --"wdt:P403"--> c5 v4 --"wdt:P131"--> v6 v6 --"wdt:P131"--> v7 v7 --"wdt:P131"--> c7 v7 --"wdt:P131"--> v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end