Postgres Error Aggregate Functions Postgresql Create