query-215f0083ec5c77742d77d69f2534de23

rq turtle/ttl

title: publishers and their retracted paper count SELECT ?publisher ?publisherLabel ?count WITH { SELECT ?publisher (COUNT(DISTINCT ?work) AS ?count) WHERE { { ?work wdt:P31 wd:Q45182324 . } UNION { ?work wdt:P793 wd:Q7316896 . } UNION { ?work wdt:P5824 [] . } ?work wdt:P1433 / wdt:P123 ?publisher . } GROUP BY ?publisher ORDER BY DESC(?count) LIMIT 100 } AS %WORKS WHERE { INCLUDE %WORKS SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?count)

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#>
#title: publishers and their retracted paper count
SELECT ?publisher ?publisherLabel ?count WHERE {
   {
  SELECT ?publisher (COUNT(DISTINCT ?work) AS ?count) WHERE {
    { ?work wdt:P31 wd:Q45182324 . } UNION
    { ?work wdt:P793 wd:Q7316896 . } UNION
    { ?work wdt:P5824 [] . }
    ?work wdt:P1433 / wdt:P123 ?publisher .
} GROUP BY ?publisher
  ORDER BY DESC(?count)
  LIMIT 100
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_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 v3("?publisher"):::projected v2("?work") a1((" ")) a2((" ")) c9(["bd:serviceParam"]):::iri c4(["wd:Q7316896"]):::iri c2(["wd:Q45182324"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P5824"--> a1 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P793"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c2 end union0r <== or ==> union0l end v2 --"wdt:P1433"--> a2 a2 --"wdt:P123"--> v3 bind1[/"count(?work)"/] v2 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end