Postgres Window Functions Postgresql Database Definition