Skip to main content

lag

Function lag 

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

LAG(expr) — value of expr from the previous row.

Returns the same type as expr, always nullable (no previous row → NULL).