query-b8123d335db076bf28bd83178ce84f1f
Service catalog
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?classes ?classesLabel ?class ?classLabel (COUNT(?item) AS ?items)
WHERE
{
VALUES ?classes {wd:Q7455731}
?class wdt:P279+ ?classes.
?item wdt:P31 ?class.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?classes ?classesLabel ?class ?classLabel
ORDER BY DESC(?items)
LIMIT 25
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?class"):::projected
v2("?classes"):::projected
v4("?item"):::projected
v5("?items")
c4(["bd:serviceParam"]):::iri
c6(["en"]):::literal
bind0[/VALUES ?classes/]
bind0-->v2
bind00(["wd:Q7455731"])
bind00 --> bind0
v3 --"wdt:P279"--> v2
v4 --"wdt:P31"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind2[/"count(?item)"/]
v4 --o bind2
bind2 --as--o v5