Postgres Error Aggregate Function In Excel