query: # Title: Elo rating after date of death
  # Complex constraint from [[Property talk:P1087]]
  # date of rating > date of death
  SELECT ?item (COUNT(*) AS ?cnt) {
    ?item p:P1087 [ pq:P585 ?date; wikibase:rank ?rank ]; wdt:P570 ?dod .
    FILTER(?rank != wikibase:DeprecatedRank) .
    FILTER(?date > ?dod) .
  } GROUP BY ?item