Lines Matching full:order

269 # ORDER BY expressions
272 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY f1}} msg]
276 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY -f1}} msg]
280 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1,f2)}} msg]
284 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1)}} msg]
289 SELECT f1 FROM test1 ORDER BY 8.4;
291 } {1 {ORDER BY terms must not be non-integer constants}}
294 SELECT f1 FROM test1 ORDER BY '8.4';
296 } {1 {ORDER BY terms must not be non-integer constants}}
299 SELECT f1 FROM test1 ORDER BY 'xyz';
301 } {1 {ORDER BY terms must not be non-integer constants}}
307 SELECT * FROM t5 ORDER BY 1;
312 SELECT * FROM t5 ORDER BY 2;
317 SELECT * FROM t5 ORDER BY 3;
319 } {1 {ORDER BY column number 3 out of range - should be between 1 and 2}}
323 SELECT * FROM t5 ORDER BY 2, 1 DESC;
328 SELECT * FROM t5 ORDER BY 1 DESC, b;
333 SELECT * FROM t5 ORDER BY b DESC, 1;
338 # ORDER BY ignored on an aggregate query
341 set v [catch {execsql {SELECT max(f1) FROM test1 ORDER BY f2}} msg]
351 set v [catch {execsql2 {SELECT f1 FROM test1 ORDER BY f2}} msg]
356 set v [catch {execsql2 {SELECT f1 FROM test1 ORDER BY f2}} msg]
360 set v [catch {execsql2 {SELECT f1 as 'f1' FROM test1 ORDER BY f2}} msg]
381 set v [catch {execsql2 {SELECT f1 as xyzzy FROM test1 ORDER BY f2}} msg]
385 set v [catch {execsql2 {SELECT f1 as "xyzzy" FROM test1 ORDER BY f2}} msg]
389 set v [catch {execsql2 {SELECT f1 as 'xyzzy ' FROM test1 ORDER BY f2}} msg]
393 set v [catch {execsql2 {SELECT f1+F2 as xyzzy FROM test1 ORDER BY f2}} msg]
397 set v [catch {execsql2 {SELECT f1+F2 FROM test1 ORDER BY f2}} msg]
401 set v [catch {execsql2 {SELECT test1.f1+F2 FROM test1 ORDER BY f2}} msg]
406 set v [catch {execsql2 {SELECT test1.f1+F2 FROM test1 ORDER BY f2}} msg]
412 ORDER BY f2}} msg]
417 ORDER BY f2}} msg]
422 ORDER BY f2}} msg]
427 ORDER BY f2}} msg]
432 ORDER BY f2}} msg]
437 ORDER BY A.f1, B.f1}} msg]
443 ORDER BY f2;
450 ORDER BY f2+100;
473 SELECT f1 FROM test1 ORDER BY;
479 SELECT f1 FROM test1 ORDER BY f1 desc, f2 where;
497 SELECT f1 FROM test1 ORDER BY f2, f1+;
503 execsql {SELECT f1 FROM test1 WHERE 4.3+2.4 OR 1 ORDER BY f1}
508 ORDER BY f1
514 ORDER BY f1
522 FROM test1 ORDER BY f1
528 FROM test1 ORDER BY f1
554 db eval {SELECT * FROM test1 ORDER BY f1} r {}
559 db eval {SELECT * FROM test1 WHERE f1<0 ORDER BY f1} r {}
564 # Check for ORDER BY clauses that refer to an AS name in the column list
568 SELECT f1 AS x FROM test1 ORDER BY x
573 SELECT f1 AS x FROM test1 ORDER BY -x
578 SELECT f1-23 AS x FROM test1 ORDER BY abs(x)
583 SELECT f1-23 AS x FROM test1 ORDER BY -abs(x)
710 SELECT * FROM t3 UNION SELECT 3 AS 'a', 4 ORDER BY a;
731 SELECT a,b FROM t3 UNION SELECT a AS 'x', b AS 'y' FROM t4 ORDER BY a,b
732 ) ORDER BY x;
738 SELECT a,b FROM t3 UNION SELECT a AS 'x', b AS 'y' FROM t4 ORDER BY a,b
739 ) AS 'z' ORDER BY x;