public static <T, U> Collector<T, ?, Optional<Double>> percentRankBy(U value, Function<? super T, ? extends U> function, Comparator<? super U> comparator) {
        return collectingAndThen(
            collectors(rankBy(value, function, comparator), count()),
            t -> t.map((rank, count) -> rank.map(r -> (double) r / count))
        );
    }
Get a {@link Collector} that calculates the derived <code>PERCENT_RANK()</code> function given a specific ordering.
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java