Postgres Row Number Partition By Snowflake