The elo filter takes either a range, or the name of a color followed by a quoted string, e.g.
    elo 2200 2600
    elo black 2600 2800
    elo white 1900 2000
It matches a game whose specified elo field lies within the given range. It can be specified as a CQL parameter or in the body of the CQL file. As illustrated in the sample file gameinfo.cql, it works with flipcolor and can be used to find wins against a player with the specified elo:
  {player white "Ivanchuk"
   elo black 2000 2800
  result 1-0}
will find games that Ivanchuk wins (because flipcolor transforms both the elo and the result, as they are both enclosed in a braces.

An elo filter can be counted in which case it counts the elo within the range (or, if both players lie in the specified elo range, then their maximum).

For example, to sort Carlsen wins by opponent's elo, use:

     cql(input i.pgn)
      flipcolor {
      player white "Carlsen"
      result 1-0
      sort "Opponent ELO" elo black 2600 2900