query-5ce73542991771c14444fc80d0b4688e
Count that groups subclasses of certain items to also count them as GTK? (P1372)binding of software library I am trying to count all the items using the GTK toolkit. But the query lists e.g. PyGTK separately. How can I use the property
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 ?toolkit ?toolkitLabel ?count WHERE
{
{
SELECT ?toolkit (count(?item) as ?count) WHERE {
?item wdt:P1414 ?toolkit .
}
GROUP BY ?toolkit
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count"):::projected
v2("?item")
v3("?toolkit"):::projected
c3(["bd:serviceParam"]):::iri
c5(["en"]):::literal
v2 --"wdt:P1414"--> v3
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end