public static WithinGroup < Long > denseRank ( Expression < ? > ... args ) { return new WithinGroup < Long > ( Long . class , SQLOps . DENSERANK2 , args ) ; }
As an aggregate function DENSE_RANK calculates the dense 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 types must be compatible .