query-e23aafe12d5bb0e20e1d4a9cab433d9f

rq turtle/ttl

Non-Booker awards that nominees (people) have won: bubble chart

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Other awards won by Booker nominees (people)
#defaultView:BubbleChart
SELECT (COUNT(?item) AS ?count) ?otheraward ?otherawardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  ?item wdt:P1411|wdt:P166 ?award.
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s.?s ps:P166 ?otheraward FILTER(?otheraward NOT IN(wd:Q160082, wd:Q2052291))
  OPTIONAL{?s pq:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?otheraward ?otherawardLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award") v7("?count") v4("?item"):::projected v2("?otheraward"):::projected v5("?s") v6("?time") c11(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?otheraward != 'wd:Q160082'?otheraward != 'wd:Q2052291'"]] f0 --> v2 bind1[/VALUES ?award/] bind1-->v3 bind10(["wd:Q160082"]) bind10 --> bind1 bind11(["wd:Q2052291"]) bind11 --> bind1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P166"--> v3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P1411"--> v3 end union0r <== or ==> union0l end v4 --"p:direct/P31"--> c6 v4 --"p:P166"--> v5 v5 --"p:statement/P166"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P585".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind3[/"count(?item)"/] v4 --o bind3 bind3 --as--o v7