query-81ad9a486fd7b0c93202d2f1ac5755aa
4 MRC sans URL officiel
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 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 ?regionLabel
WHERE
{ # MRC sans URL officiel
{?municip wdt:P31*/wdt:P279* wd:Q204613 }
?municip wdt:P31 ?statut .
?municip wdt:P131 ?region .
?region wdt:P131 wd:Q176 .
Optional {?municip wdt:P571 ?dateCreation }
Optional {?municip wdt:P2046 ?superficie }
Optional {?municip wdt:P856 ?url }
FILTER NOT EXISTS { ?municip wdt:P856 ?url }
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 ?municip
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?dateCreation"):::projected
v5("?dissolu")
v4("?fin")
v11("?link"):::projected
v2("?municip"):::projected
v3("?pqfin")
v8("?region")
v1("?regionLabel"):::projected
v7("?statut")
v10("?superficie"):::projected
v6("?url")
a2((" "))
a1((" "))
c19([https://fr.wikipedia.org/]):::iri
c8(["wd:Q204613"]):::iri
c14(["bd:serviceParam"]):::iri
c16(["fr,en"]):::literal
c10(["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 --> v3
f0 --> v2
f0 --> c2
a1 --"p:qualifier/P582"--> v3
v2 --"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 --> v2
f1 --> c3
f1 --> v4
v2 --"p:direct/P582"--> v4
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --"p:direct/P576"--> e2v2
e2v2("?dissolu"):::projected
e2v1("?municip"):::projected
end
f2--EXISTS--> f2e2
f2 --> v2
f2 --> c4
f2 --> v5
v2 --"p:direct/P576"--> v5
f3[["not "]]
subgraph f3e3["Exists Clause"]
e3v1 --"p:direct/P856"--> e3v2
e3v1("?municip"):::projected
e3v2("?url"):::projected
end
f3--EXISTS--> f3e3
f3 --> v2
f3 --> c5
f3 --> v6
v2 --"p:direct/P856"--> v6
v2 --"p:direct/P31"--> a2
a2 --"p:direct/P279"--> c8
v2 --"p:direct/P31"--> v7
v2 --"p:direct/P131"--> v8
v8 --"p:direct/P131"--> c10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P571".-> v9
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P2046".-> v10
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P856".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v11 -."schema:about".-> v2
v11 --"schema:isPartOf"--> c19
end