query-1470995eb304432e7d82d60408412e85

rq turtle/ttl

21:55, 7 October 2021 (UTC)) talk (Dipsacus fullonum The German Elo graph template could also read P580/P582. Using them gives no loss of data. --But if you really want to, then, for example, Carlsen's rating for August 1, 2021. As you can see, the March rating is obtained. So after March, the rating was not entered 11:23, 17 October 2021 (UTC)) talk (Игорь ТемировAnd you also can't find out how many chess players have brown eyes on January 1, 2009. And who cares? We say real reasons, but you come up with useless ones. What for? 18:08, 12 October 2021 (UTC)) talk (SteakI still doubt that this is useful. Let's say I want to know Magnus Carlsen rating in January 2009. Currently, I can simply query P585 = 01/01/2009. This would need to be replaced by a filter using start time and end time. This is not user friendly. Or, you can also reverse it: If want to know someones rating in June 1999, I would currently get no result, because there was not rating published. This would be totally correct! With your method, you would get some anachronistic misleading rating.

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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/>
SELECT ?value ?maxdate  WHERE  {
  {
    SELECT (max(?date) as ?maxdate) where {
     wd:Q106807 p:P1087 [pq:P585 ?date]
     FILTER (?date <= "2021-08-01"^^xsd:dat).           
      }
    }    
  wd:Q106807 p:P1087 ?rating.
  ?rating ps:P1087 ?value.
  ?rating pq:P585 ?date.
  FILTER (?date = ?maxdate)         
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?date") v3("?maxdate"):::projected v3("?rating") v4("?value"):::projected a1((" ")) c3(["wd:Q106807"]):::iri f0[["?date = ?maxdate"]] f0 --> v1 f0 --> v3 f1[["?date <= s2021-08-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f1 --> v1 a1 --"p:qualifier/P585"--> v1 c3 --"p:P1087"--> a1 bind3[/"max(?date)"/] v1 --o bind3 bind3 --as--o v3 c3 --"p:P1087"--> v3 v3 --"p:statement/P1087"--> v4 v3 --"p:qualifier/P585"--> v1