query-fb4fc25e30102c139d69c62a1e41e25a

rq turtle/ttl

19:25, 1 June 2017 (UTC)) talk (SteakCan somebody modify the above query in a way that it finds in the given month only those Elo ratings which are identical to the year of birth of the respective player?

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?eloRating ?dateOfBirth {
  ?item p:P1087 [ ps:P1087 ?eloRating; pq:P585 ?eloTime ]; wdt:P569 ?dateOfBirth .
  FILTER(YEAR(?eloTime) = 2007 && MONTH(?eloTime) = 4 && ?eloRating = YEAR(?dateOfBirth)) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?dateOfBirth"):::projected v2("?eloRating"):::projected v1("?eloTime") v4("?item"):::projected a1((" ")) f0[["year-from-dateTime(?eloTime) = '2007^^xsd:integer'month-from-dateTime(?eloTime) = '4^^xsd:integer'?eloRating = year-from-dateTime(?dateOfBirth)"]] f0 --> v1 f0 --> v2 f0 --> v3 a1 --"p:statement/P1087"--> v2 a1 --"p:qualifier/P585"--> v1 v4 --"p:P1087"--> a1 v4 --"p:direct/P569"--> v3