code: public static WithinGroup<Long> rank(Expression<?>... args) {
          return new WithinGroup<Long>(Long.class, SQLOps.RANK2, args);
      }
docs: As an aggregate function, RANK calculates the rank of a hypothetical row identified by the
  arguments of the function with respect to a given sort specification. The arguments of the
  function must all evaluate to constant expressions within each aggregate group, because they
  identify a single row within each group. The constant argument expressions and the expressions
  in the ORDER BY clause of the aggregate match by position. Therefore, the number of arguments
  must be the same and their types must be compatible.
  
  @param args arguments
  @return rank(args)