Description
Calculates date of change for a given attribute
| Change Type | Description |
|---|---|
| FIRST | Returns the date of the first time an attribute was updated |
| LAST | Returns the date of the last time an attribute was updated |
| INDEX | Returns the date of the Nth time an attribute was updated; Positive and negative indexes are supported |
Syntax
DATE_OF_CHANGE(expression, change_type)
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| field | The field argument | Any | Yes |
| as_of | The as of argument | Date or timestamp | No |
Example
SELECT
DATE_OF_CHANGE(salary, start_date)
FROM
rippling.employee.Employee
LIMIT
5;