query-d8c00a3928debddece8e2fe50a284329

rq turtle/ttl

title:Booker Prize statements with no "for work" qualifier SELECT ?item ?itemLabel ?awardLabel WHERE { VALUES ?award{wd:Q160082} ?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award . ?item wdt:P31 wd:Q5 . MINUS{ ?s pq:P1686 []} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } ORDER BY ?itemLabel

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:Booker Prize statements with no "for work" qualifier
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
 ?item wdt:P31 wd:Q5 .
MINUS{ ?s pq:P1686 []} 
    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 v4("?s") a1((" ")) c9(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?award/] bind0-->v2 bind00(["wd:Q160082"]) bind00 --> 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 v3 --"p:direct/P31"--> c6 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v4 --"p:qualifier/P1686"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end