Postgres Window Functions Postgresql Create Database