query-9ee574455de4c08943341a1fd9b7fdc7
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?type (COUNT(DISTINCT ?item) as ?count) where
{
?item (wdt:P131/wdt:P131) wd:Q3131.
?item (wdt:P31/wdt:P279*) wd:Q16970.
optional {?item wdt:P625 ?coor.}
bind(if(bound(?coor),"avec","sans") as ?type)
}
GROUP BY ?type
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coor")
v4("?count")
v1("?item"):::projected
v3("?type"):::projected
a1((" "))
a2((" "))
c2(["wd:Q3131"]):::iri
c5(["wd:Q16970"]):::iri
v1 --"wdt:P131"--> a1
a1 --"wdt:P131"--> c2
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v2
end
bind0[/"if(bound(?coor),'avec','sans')"/]
v2 --o bind0
bind0 --as--o v3
bind2[/"count(?item)"/]
v1 --o bind2
bind2 --as--o v4