max

Function max 

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

MAX(expr) - finds maximum value.

Works with any expression type (ordered types in SQL). Preserves the input expression’s SQL type. Result is nullable (empty set returns NULL).

§Example

use drizzle_core::expr::max;

let most_expensive = max(products.price);
// Generates: MAX("products"."price")
// Returns the same SQL type as products.price