query-5b067107d35a987a1b09dce7edc566fc

rq turtle/ttl

And just for fun: ?initial GROUP BY } )?initial as ))1 ,1 ,?name(substr(str (BIND . Q8229:wd P279:wdt/P282:wdt ; ?wiki P856:wdt ?wp . ?name name:schema ; ?wiki isPartOf:schema ; Q16520:wd about:schema [] ."None" optimizer:hint Query:hint { )?count as )(COUNT( ?initial SELECT 12:34, 11 November 2020 (UTC) JuraHere is another one. --- 13:29, 11 November 2020 (UTC) 💛●✒️●💬 Bouzinac). Thanks, i've bought the map! https://w.wiki/m58), your query is very simple but wrong (should be 14 wikis being P*, according to that query logs • contribs • talk (Jura1woa, nice map! Excuse me, 12:48, 11 November 2020 (UTC)) talk (Andrew Gray: oh, nice! I didn't know about substr(), that's a lot easier than using the fixed letter binding. Jura1@

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?initial (COUNT(*) as ?count)
{

    [] schema:about wd:Q16520 ; schema:name ?name .
    BIND( str(substr(?name, 1, 1)) as ?initial) 
    [] wdt:P31 wd:Q19776628 ; wdt:P487 ?initial .
}  
GROUP BY ?initial

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?count") v2("?initial"):::projected v1("?name") a1((" ")) a2((" ")) c2(["wd:Q16520"]):::iri c5(["wd:Q19776628"]):::iri a1 --"schema:about"--> c2 a1 --"schema:name"--> v1 bind0[/"str(substring(?name,'1^^xsd:integer','1^^xsd:integer'))"/] v1 --o bind0 bind0 --as--o v2 a2 --"wdt:P31"--> c5 a2 --"wdt:P487"--> v2 bind2[/"count(*)"/] bind2 --as--o v3