query-092835511eb7b8a86d3f37754011a4d7

rq turtle/ttl

Municipalités sans identifiant statcan

Use at

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?municip ?link ?municipLabel ?dateCreation ?superficie ?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:P3012 ?statscan }
    Optional {?municip wdt:P571 ?dateCreation }
    Optional {?municip wdt:P2046 ?superficie }
    Optional {?municip wdt:P856 ?url }
    FILTER NOT EXISTS { ?municip wdt:P856 ?statscan }
    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" .
    }
    OPTIONAL {
            ?link schema:about ?municip .
            ?link schema:isPartOf <https://fr.wikipedia.org/> }
} 
ORDER BY ?regionLabel ?mrcLabel ?municipLabel
LIMIT 2000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v12("?dateCreation"):::projected v7("?dissolu") v6("?fin") v15("?link"):::projected v10("?mrc") v2("?mrcLabel"):::projected v5("?municip"):::projected v3("?municipLabel"):::projected v4("?pqfin") v11("?region") v1("?regionLabel"):::projected v8("?statscan") v9("?statut") v13("?superficie"):::projected v14("?url") a2((" ")) a1((" ")) c21([https://fr.wikipedia.org/]):::iri c8(["wd:Q3327873"]):::iri c9(["wd:Q3518810"]):::iri c16(["bd:serviceParam"]):::iri c18(["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/P856"--> e3v2 e3v1("?municip"):::projected e3v2("?statscan"):::projected end f3--EXISTS--> f3e3 f3 --> v5 f3 --> c5 f3 --> v8 v5 --"p:direct/P856"--> 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/P3012".-> v8 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P571".-> v12 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P2046".-> v13 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P856".-> v14 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c16 --"wikibase:language"--> c18 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v15 -."schema:about".-> v5 v15 --"schema:isPartOf"--> c21 end