query-e924b73c06dfbb5c2bda196345d5b19d

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?bibcode (count(?paper) as ?papercount) (count(?P819) as ?P819count) (?papercount - ?P819count as ?diff) WHERE
{
   { 
  SELECT ?item ?itemLabel ?bibcode WHERE {
  ?item wdt:P1300  ?bibcode .
  VALUES ?item {wd:Q180445 wd:Q192864 wd:Q2261792 wd:Q2018386 wd:Q3470990 wd:Q2284414 wd:Q2128181}
  OPTIONAL{ ?item rdfs:label ?itemLabel . filter(lang(?itemLabel)="en") }
  } }  ?paper wdt:P1433 ?item.
  optional {?paper wdt:P819 ?P819.}
} group by ?item ?itemLabel ?bibcode order by desc(?papercount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?P819"):::projected v7("?P819count"):::projected v4("?bibcode"):::projected v8("?diff") v5("?item"):::projected v2("?itemLabel"):::projected v5("?paper"):::projected v7("?papercount"):::projected v5 --"wdt:P1300"--> v4 bind0[/VALUES ?item/] bind0-->v5 bind00(["wd:Q180445"]) bind00 --> bind0 bind01(["wd:Q192864"]) bind01 --> bind0 bind02(["wd:Q2261792"]) bind02 --> bind0 bind03(["wd:Q2018386"]) bind03 --> bind0 bind04(["wd:Q3470990"]) bind04 --> bind0 bind05(["wd:Q2284414"]) bind05 --> bind0 bind06(["wd:Q2128181"]) bind06 --> bind0 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v2 end v5 --"wdt:P1433"--> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P819".-> v6 end bind3[/"count(?paper)"/] v5 --o bind3 bind3 --as--o v7 bind4[/"count(?P819)"/] v6 --o bind4 bind4 --as--o v7 bind5[/"?papercount - ?P819count"/] v7 --o bind5 v7 --o bind5 bind5 --as--o v8