query-efdeb27b9959d220ebce542909c5dde5

rq turtle/ttl

title:Average number of statements for Italian schools by region SELECT ?r ?reg (AVG(?number) AS ?media_st) WHERE { ?item wdt:P5114 [] ; wdt:P131* ?r ; wikibase:statements ?number . ?r wdt:P31 ?v ; wdt:P1705 ?reg . VALUES ?v { wd:Q16110 wd:Q1710033 } . FILTER(LANG(?reg) = 'it') } GROUP BY ?r ?reg ORDER BY DESC(?media_st)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#title:Average number of statements for Italian schools by region
SELECT ?r ?reg (AVG(?number) AS ?media_st)
WHERE {
  ?item wdt:P5114 [] ; wdt:P131* ?r ; wikibase:statements ?number .
  ?r wdt:P31 ?v ; wdt:P1705 ?reg . VALUES ?v { wd:Q16110 wd:Q1710033 } . FILTER(LANG(?reg) = 'it')
}
GROUP BY ?r ?reg
ORDER BY DESC(?media_st)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item") v7("?media_st") v5("?number"):::projected v4("?r"):::projected v2("?reg"):::projected v7("?v") a1((" ")) f0[["?reg = 'it'"]] f0 --> v2 v3 --"wdt:P5114"--> a1 v3 --"wdt:P131"--> v4 v3 --"wikibase:statements"--> v5 v4 --"wdt:P31"--> v7 v4 --"wdt:P1705"--> v2 bind1[/VALUES ?v/] bind1-->v7 bind10(["wd:Q16110"]) bind10 --> bind1 bind11(["wd:Q1710033"]) bind11 --> bind1 bind3[/"average(?number)"/] v5 --o bind3 bind3 --as--o v7