Postgres Window Functions Snowflake