query-66800c6ef19d59280d4d9bd8211c9889
Elo ratings without sourceI am trying to build a query that gives me all Elo ratings without a source ("imported from" shall not be considered as a source). I arrived at the following query, but this is not quite correct as Elo ratings without any source are not listed (I know some examples, so I know that they are missing):
Use at
- https://query.wikidata.org/sparql
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?elo ?date WHERE { ?item p:P1087 ?stmt . ?stmt prov:wasDerivedFrom ?ref . MINUS { ?ref pr:P248 [] } ?stmt ps:P1087 ?elo . OPTIONAL { ?stmt pq:P585 ?date } }
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?date"):::projected
v4("?elo"):::projected
v1("?item"):::projected
v3("?ref")
v2("?stmt")
a1((" "))
v1 --"p:P1087"--> v2
v2 --"prov:wasDerivedFrom"--> v3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:reference/P248"--> a1
end
v2 --"p:statement/P1087"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P585".-> v5
end