 126 | Method javax.persistence.criteria.CriteriaBuilder Expression avg( Expression x ) Create an aggregate expression applying the avg operation. Parameters: x - expression representing input value to avg operation Returns: avg expression Since: JPA 2.0 |
 36 | (count, sum, avg, max, min) that are carried out on all the objects (or the object tuples) in the group ... of numeric values. AVG - returns the average of numeric values as a double value. MIN - returns the minimum ... :
SELECT SUM(c.population), AVG(c.population)
FROM Country c
WHERE 'English' MEMBER OF c.languages |
 18 | but cannot be one of the following reserved words: ABS, ALL, AND, ANY, AS, ASC, AVG, BETWEEN, BIT_LENGTH, BOTH, BY, CASE, CHAR |
 18 | , having, count, sum, avg, min, max, ...). ORDER BY clause (orderBy, Order, asc, desc). The links |
 18 | queries (max, min, count, sum and avg). ObjectDB supports rich queries, including aggregate queries |
 18 | GROUP BY / HAVING (groupBy, having, count, sum, avg, min, max, ...). Criteria ORDER BY (orderBy, Order, asc, desc). |
 18 | ());
// Find the average X value:
Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p |
 18 | of a query that returns a single result: Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p |
 18 | of a query that returns a single result: Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p |
 18 | , AVG, MAX, MIN). Query Expressions Path navigation expressions using the dot (.) operator. Comparison |