query-26a6d3ff4ca29b76927155fb05be09de

rq turtle/ttl

Municipalités sans identifiant CTQ : 0%Aucune

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?municip ?municipLabel ?statutLabel ?mrcLabel ?regionLabel  
WHERE 
{
    {?municip wdt:P31*/wdt:P279* wd:Q3327873 } UNION {?municip wdt:P31 wd:Q3518810 }
    ?municip wdt:P31 ?statut .
    ?municip wdt:P131 ?mrc .
    ?mrc wdt:P131 ?region .  
    ?region wdt:P131 wd:Q176 .
    Optional {?municip wdt:P2100 ?mrc .}
    FILTER NOT EXISTS { ?municip wdt:P2100 ?ctq }
    FILTER NOT EXISTS { ?municip wdt:P576 ?dissolu}
    FILTER NOT EXISTS { ?municip wdt:P582 ?fin }
    FILTER NOT EXISTS { ?municip p:P31 [ pq:P582 ?pqfin ] }
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "fr,en" .
    }
} 
ORDER BY ?regionLabel ?mrcLabel ?municipLabel
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?ctq") v7("?dissolu") v6("?fin") v10("?mrc") v2("?mrcLabel"):::projected v5("?municip"):::projected v3("?municipLabel"):::projected v4("?pqfin") v11("?region") v1("?regionLabel"):::projected v9("?statut") a2((" ")) a1((" ")) c8(["wd:Q3327873"]):::iri c9(["wd:Q3518810"]):::iri c13(["bd:serviceParam"]):::iri c15(["fr,en"]):::literal c11(["wd:Q176"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0a1 --"p:qualifier/P582"--> e0v1 e0v2 --"p:P31"--> e0a1 e0v2("?municip"):::projected e0v1("?pqfin"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> a1 f0 --> c1 f0 --> v4 f0 --> v5 f0 --> c2 a1 --"p:qualifier/P582"--> v4 v5 --"p:P31"--> a1 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"p:direct/P582"--> e1v2 e1v2("?fin"):::projected e1v1("?municip"):::projected end f1--EXISTS--> f1e1 f1 --> v5 f1 --> c3 f1 --> v6 v5 --"p:direct/P582"--> v6 f2[["not "]] subgraph f2e2["Exists Clause"] e2v1 --"p:direct/P576"--> e2v2 e2v2("?dissolu"):::projected e2v1("?municip"):::projected end f2--EXISTS--> f2e2 f2 --> v5 f2 --> c4 f2 --> v7 v5 --"p:direct/P576"--> v7 f3[["not "]] subgraph f3e3["Exists Clause"] e3v1 --"p:direct/P2100"--> e3v2 e3v2("?ctq"):::projected e3v1("?municip"):::projected end f3--EXISTS--> f3e3 f3 --> v5 f3 --> c5 f3 --> v8 v5 --"p:direct/P2100"--> v8 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P31"--> c9 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P31"--> a2 a2 --"p:direct/P279"--> c8 end union0r <== or ==> union0l end v5 --"p:direct/P31"--> v9 v5 --"p:direct/P131"--> v10 v10 --"p:direct/P131"--> v11 v11 --"p:direct/P131"--> c11 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P2100".-> v10 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end