query-5d701da10aac7f4b63b4f4f298f39cfc

rq turtle/ttl

With this query, I want to filter out chess players with FIDE ID that have already a federation statement with a "stated in" reference. Obviously it does not work. Whats wrong?

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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#>
SELECT ?item ?itemLabel
WHERE 
{
  ?item wdt:P106 wd:Q10873124.
  ?item wdt:P1440 ?fide .
  MINUS {  ?item p:P1532 ?P1532statement. 
  ?P1532statement prov:wasDerivedFrom ?refnode.
  ?refnode pr:P248 [].} .

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?P1532statement") v2("?fide") v1("?item"):::projected v4("?refnode") a1((" ")) c8(["bd:serviceParam"]):::iri c2(["wd:Q10873124"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P106"--> c2 v1 --"p:direct/P1440"--> v2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"p:P1532"--> v3 v3 --"prov:wasDerivedFrom"--> v4 v4 --"p:reference/P248"--> a1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end