query-1e9bfc9ab4c06ceb430f3e41c32fb380
More higherWith this query I have the lis of all the chess player with ELO > 2700, The problem is that are reported more rows for item. I need only the most recent higher ELO or the oldest higher ELO is feasible? (regardless of rank.)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 ?elo ?date WHERE {
?item wdt:P1087 ?elo .
FILTER(?elo > 2700)
optional {?item p:P1087 ?statement .}
optional {?statement pq:P585 ?date .}
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;
v4("?date"):::projected
v1("?elo"):::projected
v2("?item"):::projected
v3("?statement")
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?elo > '2700^^xsd:integer'"]]
f0 --> v1
v2 --"p:direct/P1087"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P1087".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P585".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end