query-61ab827078246c2c25d8331a4cdbb352
Count folder IDs by type
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select (str(count(distinct ?pm20Id)) as ?idCount) ?type
where {
?wd wdt:P4293 ?pm20Id .
bind(substr(?pm20Id, 0, 3) as ?type)
}
group by ?type
order by ?type
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?idCount")
v3("?pm20Id")
v4("?type"):::projected
v2("?wd")
v2 --"wdt:P4293"--> v3
bind0[/"substring(?pm20Id,'0^^xsd:integer','3^^xsd:integer')"/]
v3 --o bind0
bind0 --as--o v4
bind2[/"str()"/]
null --o bind2
bind2 --as--o v4