Snowflake Vs MS-SQL - Part 123 - Conditional Change Event - Compare with the Previous Value of the Row
Conditional Change Event - Compare with the Previous Value of the Row Use this to identify when a column value in the current row differs from the value in the previous row. In the last column, we track how many times the Voltage column value changes. MS-SQL Server You can achieve this by using the built-in Windows function LAG as below: In Snowflake, we can use a similar approach as above; however, we can make use of the Window function CONDITIONAL_CHANGE_EVENT keyword as follows: For more details, refer to the CONDITIONAL_CHANGE_EVENT section. Yogesh Shinde LinkedInProfile <<< Back Next >>> Snowflake Vs MS-SQL - Series