Query\QueryBuilderInterface::selectMax

Selects the maximum value of a field from a query