query-df28004f25aced69dc26fb9fad697e78

rq turtle/ttl

Propertiespart of the series (P179)instance of (P31)subclass of (P279)

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 ?seriesType ?seriesTypeLabel ?instanceCount 
WHERE {
  {
    SELECT ?seriesType (COUNT(DISTINCT ?series) AS ?instanceCount)
    WHERE {
      ?item wdt:P179 ?series .
      ?series wdt:P31/wdt:P279* ?seriesType.
      ?seriesType wdt:P279* wd:Q7725310 .
    }
    GROUP BY ?seriesType 
    ORDER BY DESC(?instanceCount)
    LIMIT 100
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?instanceCount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?instanceCount"):::projected v2("?item") v3("?series") v4("?seriesType"):::projected a1((" ")) c6(["bd:serviceParam"]):::iri c4(["wd:Q7725310"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P179"--> v3 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v4 v4 --"wdt:P279"--> c4 bind1[/"count(?series)"/] v3 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end