query-c552e5134a5e1df6b0907edfada576e8
TODO
Use at
- https://query.wikidata.org/sparql
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 .
FILTER (?item NOT IN ( 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")
v2("?item"):::projected
v3("?itemLabel"):::projected
v5("?paper"):::projected
v7("?papercount"):::projected
f0[["?item != 'wd:Q180445'?item != 'wd:Q192864'?item != 'wd:Q2261792'?item != 'wd:Q2018386'?item != 'wd:Q3470990'?item != 'wd:Q2284414'?item != 'wd:Q2128181'"]]
f0 --> v2
v2 --"wdt:P1300"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v3
end
v5 --"wdt:P1433"--> v2
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