PowerCenter
- PowerCenter 10.5.1
- All Products
LAG (column_name,offset,default)
Argument
| Required/
Optional
| Description
|
---|---|---|
column_name
| Required
| The target column or expression that the function operates on.
|
offset
| Required
| Integer data type. The number of rows before the current row to obtain a value from.
|
default
| Optional
| The default value to be returned in case the offset is outside the bounds of the partition or table. Default is NULL.
|
LAG ( ORDER_DATE, 1, NULL )
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DATE_DIFF( EVENT_TIME, LAG ( EVENT_TIME, 1, NULL ), 'ss' )
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|