About SUM

manual

GROUP BY and HAVING clauses

Explains how to use the GROUP BY and HAVING clauses in a JPA/JPQL query.... combination). Aggregate calculations (count, sum, avg, max, min) that are carried out on all the objects (or the object ... representing the number of elements. SUM - returns the sum of numeric values. AVG - ...

 
api-jpa

sum(x)

Create an aggregate expression applying the sum operation.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

sum(x, y)

Create an expression that returns the sum of its arguments.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

sum(x, y)

Create an expression that returns the sum of its arguments.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

sum(x, y)

Create an expression that returns the sum of its arguments.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

javax.persistence.criteria.CriteriaBuilder

Used to construct criteria queries, compound selections, expressions, predicates, orderings.(Interface of JPA)

 
manual

Numbers in JPQL and Criteria Queries

Shows how numbers, arithmetic expressions and numeric functions and operators (MOD, ABS) can be used in JPQL queries.... Reference Page... <Integer> sum1 = cb. sum sum(x, y) CriteriaBuilder's method Create an expression that ...

 
api-jpa

sumAsLong(x)

Create an aggregate expression applying the sum operation to an Integer-valued expression, returning a Long result.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

sumAsDouble(x)

Create an aggregate expression applying the sum operation to a Float-valued expression, returning a Double result.(Method of javax.persistence.criteria.CriteriaBuilder)

 
manual

JPA Criteria API Queries

Explains how to use the JPA Criteria API (CriteriaBuilder, CriteriaQuery, etc.) to build JPQL like queries.... operation. See JavaDoc Reference Page... , sum sum(x) CriteriaBuilder's method Create an aggregate expression ...