I have basic support for sum() working, but the API isn't right. When
summing integral types in JPQL, JPQL always returns a Long, not the type
being summed over. I'll need to rework that.