Skip to main content

max

Function max 

Source
pub fn max<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, E::SQLType, Null, Agg, E::Sources>
where V: SQLParam + 'a, E: Expr<'a, V>,
Expand description

Largest value (MAX).

Accepts any expression. The result has the argument’s SQL type, is nullable (MAX of no rows is NULL), and is an aggregate.

§Examples

assert_eq!(max(users.age).sql(), r#"MAX ("users"."age")"#);