query-df1e246a6ae484ed1c9bffc3ba7d5098
Monuments avec P969 TODO
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?communeLabel ?P969 WHERE {
{
SELECT DISTINCT ?item WHERE {
?item (wdt:P1435/wdt:P279*) wd:Q14469659.
?item p:P1435 ?heritage_statement.
FILTER(NOT EXISTS { ?heritage_statement pq:P582 ?end. })
}
}
?item (wdt:P131/wdt:P131*) wd:Q510572.
?item wdt:P131 ?commune.
?item wdt:P969 ?P969.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
GROUP BY ?item ?itemLabel ?communeLabel ?P969
ORDER BY ?communeLabel ?itemLabel
Query found at
- https://www.wikidata.org/wiki/User:Fralambert/Statut_municipal
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/10
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?P969"):::projected
v6("?commune")
v1("?communeLabel"):::projected
v4("?end")
v3("?heritage_statement")
v5("?item"):::projected
v2("?itemLabel")
a1((" "))
a2((" "))
c10(["bd:serviceParam"]):::iri
c4(["wd:Q14469659"]):::iri
c7(["wd:Q510572"]):::iri
c12(["fr"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v2("?end"):::projected
e0v1("?heritage_statement"):::projected
end
f0--EXISTS--> f0e0
f0 --> v3
f0 --> c1
f0 --> v4
v3 --"p:qualifier/P582"--> v4
v5 --"p:direct/P1435"--> a1
a1 --"p:direct/P279"--> c4
v5 --"p:P1435"--> v3
v5 --"p:direct/P131"--> a2
a2 --"p:direct/P131"--> c7
v5 --"p:direct/P131"--> v6
v5 --"p:direct/P969"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end