query-ece6a1dc45766068373153c521909a05
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
SELECT ?first_letter (COUNT(?first_letter) as ?count) (?count/?total*100 AS ?pct)
WHERE
{
{
SELECT (COUNT(?article) AS ?total)
WHERE
{
?article schema:isPartOf <https://is.wikipedia.org/>.
}
} ?article schema:name ?title.
?article schema:isPartOf <https://is.wikipedia.org/>.
BIND (SUBSTR(?title, 1, 1) AS ?first_letter)
}
GROUP BY ?first_letter ?total
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?article")
v5("?count"):::projected
v4("?first_letter"):::projected
v6("?pct")
v3("?title")
v2("?total"):::projected
c2([https://is.wikipedia.org/]):::iri
v1 --"schema:isPartOf"--> c2
bind1[/"count(?article)"/]
v1 --o bind1
bind1 --as--o v2
v1 --"schema:name"--> v3
v1 --"schema:isPartOf"--> c2
bind2[/"substring(?title,'1^^xsd:integer','1^^xsd:integer')"/]
v3 --o bind2
bind2 --as--o v4
bind4[/"count(?first_letter)"/]
v4 --o bind4
bind4 --as--o v5
bind5[/"?count / ?total * '100^^xsd:integer'"/]
v5 --o bind5
v2 --o bind5
bind5 --as--o v6