query-5e3bb0856fea9101f1689a5c0fe7602e
Quartiers de référence de Montréal : 98%
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 ?id ?no ?idLabel ?link ?ArrondissementLabel ?population ?geo WHERE
{
?id wdt:P31 wd:Q123705 . # Quartier
?id wdt:P131* wd:Q340 . # Ville de Montréal
?id wdt:P131 ?Arrondissement .
OPTIONAL {?id p:P31 [ pq:P1545 ?no ]}
OPTIONAL {?id wdt:P1545 ?no}
OPTIONAL {?id wdt:P1082 ?population }
OPTIONAL {?id wdt:P625 ?geo }
FILTER NOT EXISTS { ?id wdt:P31 wd:Q22674925 }
SERVICE wikibase:label {bd:serviceParam wikibase:language "fr,en" . }
OPTIONAL {
?link schema:about ?id .
?link schema:isPartOf <https://fr.wikipedia.org/> .
}
}
ORDER BY ?no
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?Arrondissement")
v5("?geo"):::projected
v2("?id"):::projected
v6("?link"):::projected
v1("?no"):::projected
v4("?population"):::projected
a1((" "))
c2(["wd:Q22674925"]):::iri
c17([https://fr.wikipedia.org/]):::iri
c12(["bd:serviceParam"]):::iri
c14(["fr,en"]):::literal
c3(["wd:Q123705"]):::iri
c5(["wd:Q340"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:direct/P31"--> e0c2
e0v1("?id"):::projected
e0c2(["wd:Q22674925"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> c2
v2 --"p:direct/P31"--> c2
v2 --"p:direct/P31"--> c3
v2 --"p:direct/P131"--> c5
v2 --"p:direct/P131"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:qualifier/P1545".-> v1
v2 --"p:P31"--> a1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1545".-> v1
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1082".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P625".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v2
v6 --"schema:isPartOf"--> c17
end