query-e00320d448a68994fb42963b6ddbe010

rq turtle/ttl

title:Booker Prize statements with no references SELECT ?item ?itemLabel ?awardLabel WHERE { VALUES ?award{wd:Q160082 wd:Q2052291} ?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award . MINUS{?s prov:wasDerivedFrom/pr:P854 ?refurl FILTER(CONTAINS(STR(?refurl),"bookerprizes.com"))} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } ORDER BY ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Booker Prize statements with no references
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
MINUS{?s prov:wasDerivedFrom/pr:P854 ?refurl FILTER(CONTAINS(STR(?refurl),"bookerprizes.com"))} 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?award") v3("?item"):::projected v1("?itemLabel"):::projected v5("?refurl") v4("?s") a1((" ")) c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?award/] bind0-->v2 bind00(["wd:Q160082"]) bind00 --> bind0 bind01(["wd:Q2052291"]) bind01 --> bind0 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"p:P1411"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:P166"--> v4 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 --"p:statement/P1411"--> v2 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"p:statement/P166"--> v2 end union1r <== or ==> union1l end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; f2[["contains(str(?refurl),'bookerprizes.com')"]] f2 --> v5 v4 --"prov:wasDerivedFrom"--> a1 a1 --"p:reference/P854"--> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end