query-227acc86557564d91d61e9939d4b362a

rq turtle/ttl

Creators: comparison of Ashmolean items versus items in other GLAMs

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 DISTINCT ?creator ?creatorLabel ?creatorDescription ?enwp ?ash_items (COUNT(?other) as ?other) WHERE {
{ SELECT ?creator ?enwp (COUNT(?item) AS ?ash_items) WHERE {
  ?item wdt:P195 wd:Q636400; # collection: Ashmolean
 wdt:P170 ?creator FILTER (?creator != wd:Q4233718) # Exclude anonymous
  OPTIONAL { ?enwp schema:about ?creator; schema:isPartOf <https://en.wikipedia.org/> }
  } GROUP BY ?creator ?enwp
 }
?other wdt:P170 ?creator MINUS {?other wdt:P195 wd:Q636400} # objects by same creator but not in Ashmolean
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?creator ?creatorLabel ?creatorDescription ?enwp ?ash_items
ORDER BY DESC(?ash_items) DESC(?other)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?ash_items"):::projected v3("?creator"):::projected v5("?enwp"):::projected v4("?item") v6("?other"):::projected c7([https://en.wikipedia.org/]):::iri c9(["bd:serviceParam"]):::iri c3(["wd:Q636400"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?creator != 'wd:Q4233718'"]] f0 --> v3 v4 --"wdt:P195"--> c3 v4 --"wdt:P170"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:about".-> v3 v5 --"schema:isPartOf"--> c7 end bind2[/"count(?item)"/] v4 --o bind2 bind2 --as--o v6 v6 --"wdt:P170"--> v3 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v6 --"wdt:P195"--> c3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind5[/"count(?other)"/] v6 --o bind5 bind5 --as--o v6