Postgres Row Number Partition By Sqlite