query-12c24141dce01d1ab26c6e4b6019adf3

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)main subject (P921)

Use at

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 ?item ?itemLabel (COUNT(?article) AS ?count)
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q235557.
  ?article wdt:P31 wd:Q13442814.
  ?article wdt:P921 ?item.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

GROUP BY ?item ?itemLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article"):::projected v4("?count") v2("?item"):::projected a1((" ")) c3(["wd:Q235557"]):::iri c4(["wd:Q13442814"]):::iri c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v3 --"wdt:P31"--> c4 v3 --"wdt:P921"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind1[/"count(?article)"/] v3 --o bind1 bind1 --as--o v4