query-31f8eb70fa82beab904ba071fc2e895f
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?publisher ?publisherLabel (AVG(?pages) AS ?avgPages)
WHERE
{
?book wdt:P123 ?publisher;
wdt:P1104 ?pages.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?publisher ?publisherLabel
ORDER BY DESC(?avgPages)
Query found at
- https://www.wikidata.org/wiki/User:D1gggg/Wikidata_model_and_SPARQL
- https://www.wikidata.org/wiki/User:TweetsFactsAndQueries/A_Guide_To_WDQS/Staging
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?avgPages")
v2("?book")
v4("?pages"):::projected
v3("?publisher"):::projected
c4(["bd:serviceParam"]):::iri
c6(["en"]):::literal
v2 --"wdt:P123"--> v3
v2 --"wdt:P1104"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind1[/"average(?pages)"/]
v4 --o bind1
bind1 --as--o v5