query-f1f5791ab29cf1682d7f1e2b4a771330
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
select ?lieu (count(?lieu) AS ?count) {
?lieu wdt:P1464 ?cat
OPTIONAL { ?wartfrcat schema:about ?cat . ?wartfrcat schema:inLanguage "fr" }
FILTER(!bound(?wartfrcat))
optional { filter(! bound(?cat)) } .
?pers wdt:P19 ?lieu .
OPTIONAL { ?wartfrpers schema:about ?pers . ?wartfrpers schema:inLanguage "fr" }
FILTER(bound(?wartfrpers)) .
} group by(?lieu) order by desc(?count) limit 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?cat")
v7("?count")
v5("?lieu"):::projected
v6("?pers")
v3("?wartfrcat")
v2("?wartfrpers")
c4(["fr"]):::literal
f0[["bound(?wartfrpers)"]]
f0 --> v2
f1[["not bound(?wartfrcat)"]]
f1 --> v3
v5 --"wdt:P1464"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:about".-> v4
v3 --"schema:inLanguage"--> c4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
end
v6 -."wdt:P19".-> v5
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."schema:about".-> v6
v2 --"schema:inLanguage"--> c4
end
bind3[/"count(?lieu)"/]
v5 --o bind3
bind3 --as--o v7