query-238437b3fa1b35548e15b63f0f1e2052
Finding subclasses of computer-related classes
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:Q5300 wd:Q259864 wd:Q272683 wd:Q1303814 wd:13407144}
?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:Q5300"])
bind00 --> bind0
bind01(["wd:Q259864"])
bind01 --> bind0
bind02(["wd:Q272683"])
bind02 --> bind0
bind03(["wd:Q1303814"])
bind03 --> bind0
bind04(["wd:13407144"])
bind04 --> 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