About SUM

1-10 of 32Refresh
JPA Doc
87

sum(x)

Method javax.persistence.criteria.CriteriaBuilder Expression sum(   Expression x ) Create an aggregate expression applying the sum operation. Parameters: x - expression representing input value to sum operation Returns: sum expression Since: JPA 2.0
JPA Doc
86

sum(x, y)

Method javax.persistence.criteria.CriteriaBuilder Expression sum(   Expression x,   N y ) Create an expression that returns the sum of its arguments. Parameters: x - expression y - value Returns: sum Since: JPA 2.0
JPA Doc
86

sum(x, y)

Method javax.persistence.criteria.CriteriaBuilder Expression sum(   N x,   Expression y ) Create an expression that returns the sum of its arguments. Parameters: x - value y - expression Returns: sum Since: JPA 2.0
JPA Doc
86

sum(x, y)

Method javax.persistence.criteria.CriteriaBuilder Expression sum(   Expression x,   Expression y ) Create an expression that returns the sum of its arguments. Parameters: x - expression y - expression Returns: sum Since: JPA 2.0
Manual
59

GROUP BY and HAVING clauses

(count, sum, avg, max, min) that are carried out on all the objects (or the object tuples) in the group ... of SQL: COUNT - returns a long value representing the number of elements. SUM - returns the sum ... that currency: SELECT c.currency, SUM(c.population) FROM Country c WHERE 'Europe' MEMBER OF c
Manual
30

Numbers in JPQL and Criteria Queries

= cb.parameter(Integer.class); // Addition (+) Expression sum1 = cb.sum(path, param); // expression + expression Expression sum2 = cb.sum(path, 1000); // expression + number Expression sum3 = cb.sum(1000, path); // number + expression // Subtraction
Issue
28

Wrong type on SUM function

(         "SELECT cc.totalCC.moneda, SUM(cc.totalCC.importe) FROM ComprobanteContable cc " +         "WHERE cc ... ", this).getResultList(); The problem is about SUM on cc.totalCC.importe, a BigDecimal field. It works fine on all groups giving to me the correct sum BigDecimal value, except in one group
JPA Doc
26

javax.persistence.criteria.CriteriaBuilder

Expression sum( Expression x) Create an aggregate expression applying the sum operation. Create an aggregate expression applying the sum operation. Parameters: x - expression representing input value to sum operation Returns: sum expression Since: JPA 2.0 Expression sum( Expression x, N y
Manual
25

JPA Criteria API Queries

, having, count, sum, avg, min, max, ...). ORDER BY clause (orderBy, Order, asc, desc). The links ... , currentDate, ...). Paths, navigation and types (get, type). Arithmetic expressions (sum, diff, prod
Manual
17

JPA Query Expressions (JPQL / Criteria)

, navigation and types (get, type). Arithmetic expressions (sum, diff, prod, quot, mod, abs, neg