query-a6397c36afe2423e2fb7da21005c4344
Query statement in references as main statement and who are dead: Property:P1440I want to query a certain statement in the reference of another statement. This query gives me all chess players who have at least one Elo rating, have no
Use at
- https://query.wikidata.org/sparql
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?fideid
WHERE {
?item wdt:P106 wd:Q10873124 .
?item wdt:P570 ?died .
MINUS {?item wdt:P1440 ?id } .
?item p:P1087 ?elo .
#?elo prov:wasDerivedFrom ?ref .
#?ref pq:P1440 ?fideid .
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;
v2("?died")
v4("?elo")
v3("?id")
v1("?item"):::projected
c7(["bd:serviceParam"]):::iri
c2(["wd:Q10873124"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P106"--> c2
v1 --"p:direct/P570"--> v2
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P1440"--> v3
end
v1 --"p:P1087"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end