query-5b1944f20638d33ba208484aeeb51875

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (COUNT(?link) AS ?links) WHERE {
  VALUES ?item_class { wd:Q34 wd:Q183 }
  ?item wdt:P27 ?item_class.
  ?item wdt:P21 wd:Q6581072.
  ?item wdt:P31 wd:Q5.
  OPTIONAL { ?link schema:about ?item; schema:isPartOf [ wikibase:wikiGroup 'wikipedia' ] }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,[AUTO_LANGUAGE]". }
}
GROUP BY ?item ?itemLabel
ORDER BY DESC(?links) ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?item_class") v4("?link"):::projected v5("?links") a1((" ")) c3(["wd:Q6581072"]):::iri c11(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c8(["wikipedia"]):::literal c13(["de,#91;AUTO_LANGUAGE#93;"]):::literal bind0[/VALUES ?item_class/] bind0-->v3 bind00(["wd:Q34"]) bind00 --> bind0 bind01(["wd:Q183"]) bind01 --> bind0 v2 --"wdt:P27"--> v3 v2 --"wdt:P21"--> c3 v2 --"wdt:P31"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:about".-> v2 a1 --"wikibase:wikiGroup"--> c8 v4 --"schema:isPartOf"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind2[/"count(?link)"/] v4 --o bind2 bind2 --as--o v5