Postgres Aggregate Functions Not Function In Python Boolean 1