06 Oct 19 · npack ·       Add to Favorites  

Window functions - Rows between current row - Snowflake syntax

Window functions to perform OLAP operations:

select firstname,
SUM(x) OVER (PARTITION BY y ORDER BY z ROWS BETWEEN 1 PRECEDING AND 1
FOLLOWING) as ColumnAlias
from Employee;

npack

posted on 06 Oct 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

Copied