Postgres Error Aggregate Function Excel