LAG Expression Syntax - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Language
English (United States)
Last Update
2018-04-17
dita:mapPath
uce1497542673292.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1022
lifecycle
previous
Product Category
Software
{ current_expr operator LAG (previous_expr, lag_rows [, default]) |
  LAG (previous_expr, lag_rows [, default]) operator current_expr }

where:

  • current_expr is the name of a column from the current row (or an expression operating on this column).
  • operator is either >, >=, <, <=, =,or!=
  • previous_expr is the name of a column from a previous row (or an expression operating on this column).
  • lag_rows is the number of rows to count backward from the current row to reach the previous row. For example, if lag_rows is 1, the previous row is the immediately preceding row.
  • default is the value to use for previous_expr when there is no previous row (that is, when the current row is the first row or there is no row that is lag_rows before the current row).