query-d7d98f060b3e7500d9954a8e699066af

rq turtle/ttl

Count of forms with and without pronunciation audio

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT
  ?total
  ?without
  ?with
  ?ratio
{
   {
  SELECT (COUNT(*) AS ?with) {
    [] ontolex:lexicalForm [wdt:P443 []]
  }
}
   {
  SELECT (COUNT(*) AS ?total) {
    [] ontolex:lexicalForm [].
  }
}
  BIND((?total - ?with) AS ?without)
  BIND(CONCAT(STR((?with/?total)), " %") AS ?ratio)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?ratio"):::projected v2("?total"):::projected v1("?with"):::projected v3("?without"):::projected a3((" ")) a2((" ")) a4((" ")) a1((" ")) a5((" ")) a1 --"wdt:P443"--> a2 a3 --"ontolex:lexicalForm"--> a1 bind1[/"count(*)"/] bind1 --as--o v1 a4 --"ontolex:lexicalForm"--> a5 bind3[/"count(*)"/] bind3 --as--o v2 bind4[/"?total - ?with"/] v2 --o bind4 v1 --o bind4 bind4 --as--o v3 bind5[/"concat(str(?with / ?total),' %')"/] v1 --o bind5 v2 --o bind5 bind5 --as--o v4