About ORDER BY

1-10 of 200Refresh
Manual
283

ORDER BY clause (JPQL / Criteria API)

The ORDER BY clause specifies a required order for the query results. Any JPQL query that does not include an ORDER BY clause produces results in an undefined and non-deterministic order. ORDER BY ... is at least one million people, ordered by the country name: SELECT c.name FROM Country c WHERE c.population > 1000000
Manual
119

GROUP BY and HAVING clauses

The GROUP BY clause enables grouping of query results. A JPQL query with a GROUP BY clause returns properties of generated groups instead of individual objects and fields. The position of a GROUP BY clause in the query execution order is after the FROM and WHERE clauses, but before the SELECT
Manual
76

Chapter 4 - JPA Queries (JPQL / Criteria)

(and a criteria query) is explained by describing the main clauses of JPQL queries (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY): Then the expressions that are used for building JPQL and criteria query
JDO Doc
44

setOrdering(ordering)

Method javax.jdo.Query void setOrdering(   String ordering ) Set the ordering specification for the result Collection. The ordering specification is a String containing one or more ordering declarations separated by commas. Each ordering declaration is the name of the field on which to order
Manual
27

Index Definition

, the BTree is ordered by x values, so a range scan on x values is supported. On the other hand, if y is specified first, the BTree is ordered by y values, so a full BTree scan is required to find ... of the words and is not ordered by the length of the words. The bottom line is that if there is an index
Forum
26

Problem with distinct select, order by and equivalent alias/attribute path

when ordering the results of some projection when the order by expression is different (though logically ... _location "             + "order by s_location.id asc";         System.out.println("Working query ... "             + "left join s.location as s_location "             + "order by s.location.id asc
Manual
26

Database Explorer [2011-09-21]

the order of the shown fields by using the Up and Down arrow buttons or the [Field Ordering] combo ... directory a path to it has to be specified. Alternatively, you can run the Explorer by double clicking explorer.jar or by running explorer.exe (on Windows) or explorer.sh (on Unix/Linux, after editing
Manual
26

Database Explorer

the order of the shown fields by using the Up and Down arrow buttons or the [Field Ordering] combo ... directory a path to it has to be specified. Alternatively, you can run the Explorer by double clicking explorer.jar or by running explorer.exe (on Windows) or explorer.sh (on Unix/Linux, after editing
Forum
25

java.lang.NullPointerException when using ORDER BY

== 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK ... sure if this problem is related to the other as the query works if you remove the order by ... which is used in the order by part, it always has a value. Anyway, we tried fixing the indices
Forum
25

Strange behaviour with ORDER BY and IN

performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as ... ("Locations without selection criterion in descending order (by id): ");         em.createQuery("select l from Location l order by l.id desc", Location.class)             .getResultList().forEach(l