About COUNT

1-10 of 126Refresh
JPA Doc
80

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
Manual
42

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 ... (numeric, strings, dates). The following query counts for every letter the number of countries
Issue
28

Negative snapshot user count

I finally hit an instance of the "Negative snapshot user count" exception 1) [ObjectDB 2.3.2_01 ... .o.InternalException: Negative snapshot user count com.objectdb.o.InternalException: Negative snapshot user count at com.objectdb.o.SNP.z(SNP.java:292) at com.objectdb.o.SFL.Z(SFL.java:765) at com
Manual
27

Running JPA Queries [2011-09-21]

.createQuery( "SELECT COUNT(c) FROM Country c", Long.class); long countryCount = query ... and the code is simple: Query query = em.createQuery("SELECT COUNT(c) FROM Country c"); long countryCount = (Long)query.getSingleResult(); An aggregate COUNT query always returns one result, by
Manual
27

Running JPA Queries

.createQuery( "SELECT COUNT(c) FROM Country c", Long.class); long countryCount = query ... and the code is simple: Query query = em.createQuery("SELECT COUNT(c) FROM Country c"); long countryCount = (Long)query.getSingleResult(); An aggregate COUNT query always returns one result, by
Issue
27

Negative snapshot user count exception

.objectdb.com/database/issue/new com.objectdb.o.InternalException: Negative snapshot user count com.objectdb.o.InternalException: Negative snapshot user count at com.objectdb.o.SNP.D(SNP ... , the "Negative snapshot user count" and the "mismatch client-server protocol" errors could be caused by a bug
Issue
26

ClassCastException thrown when running count query

Hello! Attached you find a full stacktrace. The query was: SELECT COUNT(t) FROM Position t WHERE ((t.unit = :unit165w7ppbtu9ao AND t.receiveTime >= :receiveTimes232ne30kd42) AND (t.latitude ... produces a null pointer exception. Now back to the count query: SELECT COUNT(t) FROM Position t
Forum
26

Unexpected COUNT Results

the list with size  1380. This is expected result If we add COUNT operator: b.      SELECT COUNT($1 ... .       SELECT COUNT($1.id) FROM Pa3DataKey $1 WHERE $1.timestamp <= 187526 AND ($1.dataItems.get('Receiver
Forum
25

Processing thread count for 8-core server

In reference to the information here:  http://www.objectdb.com/java/jpa/setting/database#The_processing_element_   We are working with an 8-core processor.  The recommended thread count is "more than the number of cores but not too many."  What would be an appropriate number of threads
Manual
21

Paths and Types in JPQL and Criteria API

of all the entity objects in the database, excluding Country entity objects: SELECT COUNT(e) FROM ... counts all these objects (this is an aggregate query with no GROUP BY - all the objects are considered as one group, and COUNT calculates its size). Criteria Query Paths and Types Paths and navigations