About aggregate

11-20 of 33Refresh
Manual
25

Running JPA Queries

object is expected. The following aggregate query always returns a single result object, which is a Long ... countryCount = (Long)query.getSingleResult(); An aggregate COUNT query always returns one result, by
JPA Doc
24

javax.persistence.criteria.CriteriaBuilder

.0 Expression avg( Expression x) Create an aggregate expression applying the avg operation. Create an aggregate expression applying the avg operation. Parameters: x - expression representing ... item Since: JPA 2.0 Expression count( Expression x) Create an aggregate expression applying
Manual
18

Numbers in JPQL and Criteria Queries

Numeric values may appear in JPQL queries in many forms: as numeric literals - e.g. 123, -12.5. as parameters - when numeric values are assigned as arguments. as path expressions - in navigation to persistent numeric fields. as aggregate expressions - e.g. COUNT. as collection functions
Manual
18

Paths and Types in JPQL and Criteria API

counts all these objects (this is an aggregate query with no GROUP BY - all the objects are considered
JDO Doc
10

javax.jdo.Query

to obtain persistent instances, values, and aggregate data from the data store. The PersistenceManager ... must either be an expression contained in the grouping, or an aggregate evaluated once per group. Parameters ... field values (projections) and aggregate function results. Parameters: data - a comma-delimited
JDO Doc
7

setResult(data)

class. If set, this query will return expressions, including field values (projections) and aggregate ... on fields, or aggregate functions) to return from this query Since: JDO 2.0
JPA Doc
5

avg(x)

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
JPA Doc
5

count(x)

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

countDistinct(x)

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

greatest(x)

Method javax.persistence.criteria.CriteriaBuilder Expression greatest(   Expression x ) Create an aggregate expression for finding the greatest of the values (strings, dates, etc). Parameters: x - expression representing input value to greatest operation Returns: greatest expression Since: JPA 2.0