Home
last modified time | relevance | path

Searched refs:ORDER (Results 1 – 25 of 228) sorted by relevance

12345678910

/external/chromium_org/third_party/sqlite/src/test/
Dboundary2.test118 SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a
123 SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a DESC
128 SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r
133 SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r DESC
138 SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY x
143 SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a
148 SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a DESC
153 SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r
158 SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r DESC
163 SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY x
[all …]
Dboundary1.test117 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a
122 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a DESC
127 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid
132 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid DESC
137 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY x
142 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a
147 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a DESC
152 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid
157 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid DESC
162 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY x
[all …]
Dtkt-38cb5df375.test32 SELECT * FROM (SELECT * FROM t1 ORDER BY a)
42 UNION ALL SELECT a FROM (SELECT a FROM t1 ORDER BY a)
50 SELECT a FROM (SELECT * FROM t1 ORDER BY a)
51 UNION ALL SELECT a FROM (SELECT a FROM t1 ORDER BY a)
78 SELECT * FROM (SELECT * FROM t1 ORDER BY a LIMIT 3)
88 UNION ALL SELECT a FROM (SELECT a FROM t1 ORDER BY a LIMIT 3)
96 SELECT a FROM (SELECT * FROM t1 ORDER BY a LIMIT 3)
97 UNION ALL SELECT a FROM (SELECT a FROM t1 ORDER BY a LIMIT 3)
115 SELECT * FROM (SELECT * FROM t1 ORDER BY a)
117 ORDER BY 1
[all …]
Dboundary3.test129 WHERE t1.rowid > 72057594037927935 ORDER BY t2.a
135 WHERE t1.rowid > 72057594037927935 ORDER BY t1.a DESC
142 ORDER BY t1.rowid
149 ORDER BY t1.rowid DESC
156 ORDER BY x
162 WHERE t1.rowid >= 72057594037927935 ORDER BY t2.a
168 WHERE t1.rowid >= 72057594037927935 ORDER BY t1.a DESC
175 ORDER BY t1.rowid
182 ORDER BY t1.rowid DESC
189 ORDER BY x
[all …]
Dtkt2822.test13 # ORDER BY clauses on compound SELECT statements raised by ticket
27 # The ORDER BY matching algorithm is three steps:
29 # (1) If the ORDER BY term is an integer constant i, then
32 # (2) If the ORDER BY term is an identifier (not x.y or x.y.z
62 # tkt2822-1.* - Simple identifier as ORDER BY expression.
63 # tkt2822-2.* - More complex ORDER BY expressions.
80 # Test the "ORDER BY <integer>" syntax.
84 SELECT a, b, c FROM t1 UNION ALL SELECT a, b, c FROM t2 ORDER BY 1;
92 ORDER BY 2;
96 # Test the "ORDER BY <identifier>" syntax.
[all …]
Dboundary4.tcl152 maketest 1.3 {SELECT rowid, a, x FROM t1 ORDER BY +rowid} $ans
153 maketest 1.4 {SELECT rowid, a, x FROM t1 ORDER BY rowid} $ans
159 maketest 1.5 {SELECT rowid, a, x FROM t1 ORDER BY +rowid DESC} $ans
160 maketest 1.6 {SELECT rowid, a, x FROM t1 ORDER BY rowid DESC} $ans
167 maketest 1.7 {SELECT rowid, a, x FROM t1 ORDER BY +a} $ans
168 maketest 1.8 {SELECT rowid, a, x FROM t1 ORDER BY a} $ans
175 maketest 1.9 {SELECT rowid, a, x FROM t1 ORDER BY +a DESC} $ans
176 maketest 1.10 {SELECT rowid, a, x FROM t1 ORDER BY a DESC} $ans
183 maketest 1.11 {SELECT rowid, a, x FROM t1 ORDER BY +x} $ans
184 maketest 1.12 {SELECT rowid, a, x FROM t1 ORDER BY x} $ans
[all …]
Dupdate.test42 execsql {SELECT * FROM test1 ORDER BY f1}
78 execsql {SELECT * FROM test1 ORDER BY f1}
85 execsql {SELECT * FROM test1 ORDER BY f1}
91 execsql {SELECT * FROM test1 ORDER BY f1}
100 execsql {SELECT * FROM test1 ORDER BY F1}
107 execsql {SELECT * FROM test1 ORDER BY F1}
121 execsql {SELECT * FROM test1 ORDER BY f1,f2}
125 execsql {SELECT * FROM test1 ORDER BY f1,f2}
129 execsql {SELECT * FROM test1 ORDER BY f1,f2}
133 execsql {SELECT * FROM test1 ORDER BY f1,f2}
[all …]
Dsort.test43 execsql {SELECT n FROM t1 ORDER BY n}
46 execsql {SELECT n FROM t1 ORDER BY n ASC}
49 execsql {SELECT ALL n FROM t1 ORDER BY n ASC}
52 execsql {SELECT n FROM t1 ORDER BY n DESC}
55 execsql {SELECT v FROM t1 ORDER BY v}
58 execsql {SELECT n FROM t1 ORDER BY v}
61 execsql {SELECT n FROM t1 ORDER BY v DESC}
64 execsql {SELECT flt FROM t1 ORDER BY flt}
67 execsql {SELECT flt FROM t1 ORDER BY flt DESC}
70 execsql {SELECT roman FROM t1 ORDER BY roman}
[all …]
Dcollate1.test23 # collate1-1.* - Single-field ORDER BY with an explicit COLLATE clause.
24 # collate1-2.* - Multi-field ORDER BY with an explicit COLLATE clause.
25 # collate1-3.* - ORDER BY using a default collation type. Also that an
27 # collate1-4.* - ORDER BY using a data type.
74 SELECT c2 FROM collate1t1 ORDER BY 1;
79 SELECT c2 FROM collate1t1 ORDER BY 1 COLLATE hex;
84 SELECT c2 FROM collate1t1 ORDER BY 1 COLLATE hex DESC;
89 SELECT c2 FROM collate1t1 ORDER BY 1 COLLATE hex ASC;
94 SELECT c2 COLLATE hex FROM collate1t1 ORDER BY 1
99 SELECT c2 COLLATE hex FROM collate1t1 ORDER BY 1 ASC
[all …]
Dwherelimit.test43 catchsql {DELETE FROM t1 ORDER BY x}
44 } {1 {ORDER BY without LIMIT on DELETE}}
46 catchsql {DELETE FROM t1 WHERE x=1 ORDER BY x}
47 } {1 {ORDER BY without LIMIT on DELETE}}
49 catchsql {UPDATE t1 SET y=1 WHERE x=1 ORDER BY x}
50 } {1 {ORDER BY without LIMIT on UPDATE}}
85 execsql {DELETE FROM t1 ORDER BY x LIMIT 5}
90 execsql {DELETE FROM t1 ORDER BY x LIMIT 5 OFFSET 2}
95 execsql {DELETE FROM t1 ORDER BY x LIMIT 5 OFFSET -2}
100 execsql {DELETE FROM t1 ORDER BY x LIMIT 2, -5}
[all …]
Dselect3.test34 execsql {SELECT DISTINCT log FROM t1 ORDER BY log}
55 execsql {SELECT log, count(*) FROM t1 GROUP BY log ORDER BY log}
58 execsql {SELECT log, min(n) FROM t1 GROUP BY log ORDER BY log}
61 execsql {SELECT log, avg(n) FROM t1 GROUP BY log ORDER BY log}
64 execsql {SELECT log, avg(n)+1 FROM t1 GROUP BY log ORDER BY log}
67 execsql {SELECT log, avg(n)-min(n) FROM t1 GROUP BY log ORDER BY log}
70 execsql {SELECT log*2+1, avg(n)-min(n) FROM t1 GROUP BY log ORDER BY log}
74 SELECT log*2+1 as x, count(*) FROM t1 GROUP BY x ORDER BY x
79 SELECT log*2+1 AS x, count(*) AS y FROM t1 GROUP BY x ORDER BY y, x
84 SELECT log*2+1 AS x, count(*) AS y FROM t1 GROUP BY x ORDER BY 10-(x+y)
[all …]
Dwhere.test246 count {SELECT w FROM t1 WHERE w+1<=4 ORDER BY w}
396 ORDER BY 1;
403 ORDER BY 1;
410 ORDER BY 1;
417 ORDER BY 1;
422 SELECT * FROM t1 WHERE x IN (1,7) ORDER BY 1;
427 SELECT * FROM t1 WHERE x+0 IN (1,7) ORDER BY 1;
432 SELECT * FROM t1 WHERE y IN (6400,8100) ORDER BY 1;
437 SELECT * FROM t1 WHERE x=6 AND y IN (6400,8100) ORDER BY 1;
442 SELECT * FROM t1 WHERE x IN (1,7) AND y NOT IN (6400,8100) ORDER BY 1;
[all …]
Dtkt2339.test37 SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
39 SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
44 SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
46 SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
51 SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC)
53 SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC LIMIT 2)
58 SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
60 SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC)
65 SELECT * FROM (SELECT * FROM t1 ORDER BY num DESC LIMIT 2)
67 SELECT * FROM (SELECT * FROM t2 ORDER BY num DESC)
[all …]
DselectB.test77 SELECT * FROM (SELECT a FROM t1 UNION ALL SELECT d FROM t2) ORDER BY 1
79 SELECT a FROM t1 UNION ALL SELECT d FROM t2 ORDER BY 1
85 WHERE a>10 ORDER BY 1
87 SELECT a FROM t1 WHERE a>10 UNION ALL SELECT d FROM t2 WHERE d>10 ORDER BY 1
93 WHERE a>10 ORDER BY a
98 ORDER BY a
104 WHERE a>10 ORDER BY a
109 ORDER BY a
113 SELECT * FROM (SELECT a FROM t1 UNION ALL SELECT d FROM t2) ORDER BY 1
116 SELECT a FROM t1 UNION ALL SELECT d FROM t2 ORDER BY 1 LIMIT 2
[all …]
Dlike.test54 SELECT x FROM t1 WHERE x LIKE 'abc' ORDER BY 1;
59 SELECT x FROM t1 WHERE x GLOB 'abc' ORDER BY 1;
64 SELECT x FROM t1 WHERE x LIKE 'ABC' ORDER BY 1;
69 SELECT x FROM t1 WHERE x LIKE 'aBc' ORDER BY 1;
75 SELECT x FROM t1 WHERE x LIKE 'abc' ORDER BY 1;
81 SELECT x FROM t1 WHERE x LIKE 'abc' ORDER BY 1;
86 SELECT x FROM t1 WHERE x GLOB 'abc' ORDER BY 1;
91 SELECT x FROM t1 WHERE x LIKE 'ABC' ORDER BY 1;
96 SELECT x FROM t1 WHERE x LIKE 'aBc' ORDER BY 1;
102 SELECT x FROM t1 WHERE x LIKE 'abc' ORDER BY 1;
[all …]
Dselect4.test40 execsql {SELECT DISTINCT log FROM t1 ORDER BY log}
56 ORDER BY log;
65 ORDER BY log;
76 ORDER BY log DESC;
104 ORDER BY log;
110 SELECT DISTINCT log FROM t1 ORDER BY log
113 ORDER BY log;
116 } {1 {ORDER BY clause should come after UNION ALL not before}}
125 ORDER BY log;
134 ORDER BY log;
[all …]
Deqp.test53 SELECT a FROM t1 ORDER BY a
58 SELECT a FROM t1 ORDER BY +a
61 0 0 0 {USE TEMP B-TREE FOR ORDER BY}
126 det 2.2.1 "SELECT DISTINCT min(x), max(x) FROM t1 GROUP BY x ORDER BY 1" {
130 0 0 0 {USE TEMP B-TREE FOR ORDER BY}
132 det 2.2.2 "SELECT DISTINCT min(x), max(x) FROM t2 GROUP BY x ORDER BY 1" {
135 0 0 0 {USE TEMP B-TREE FOR ORDER BY}
146 det 2.2.5 "SELECT DISTINCT * FROM t1, t2 ORDER BY t1.x" {
150 0 0 0 {USE TEMP B-TREE FOR ORDER BY}
152 det 2.2.6 "SELECT DISTINCT t2.x FROM t1, t2 ORDER BY t2.x" {
[all …]
Dsubselect.test63 WHERE a = (SELECT a FROM t1 UNION SELECT b FROM t1 ORDER BY 1);
96 execsql {SELECT x FROM t2 ORDER BY x}
103 SELECT (SELECT a FROM t1 ORDER BY a), (SELECT a FROM t1 ORDER BY a DESC)
108 SELECT 1 IN (SELECT a FROM t1 ORDER BY a);
113 SELECT 2 IN (SELECT a FROM t1 ORDER BY a DESC);
117 # Verify that the ORDER BY clause is honored in a subquery.
124 SELECT * FROM t3 ORDER BY x;
134 SELECT * FROM t3 ORDER BY x;
141 SELECT sum(x) FROM (SELECT x FROM t3 ORDER BY x LIMIT 2);
146 SELECT sum(x) FROM (SELECT x FROM t3 ORDER BY x DESC LIMIT 2);
[all …]
DselectA.test16 # INTERSECT work together with an ORDER BY clause (with or w/o
68 ORDER BY a,b,c
74 ORDER BY a,b,c
80 ORDER BY t1.a, t1.b, t1.c
86 ORDER BY a DESC,b,c
92 ORDER BY a,c,b
98 ORDER BY b,a,c
104 ORDER BY b COLLATE NOCASE,a,c
110 ORDER BY b COLLATE NOCASE DESC,a,c
116 ORDER BY c,b,a
[all …]
Dtkt-f973c7ac31.test34 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='2' ORDER BY c2 DESC
39 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<=5 ORDER BY c2 DESC
44 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='5' ORDER BY c2 DESC
49 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<=5 ORDER BY c2 DESC
54 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<='5' ORDER BY c2 DESC
60 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='2' ORDER BY c2 ASC
65 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<=5 ORDER BY c2 ASC
70 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='5' ORDER BY c2 ASC
75 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<=5 ORDER BY c2 ASC
80 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<='5' ORDER BY c2 ASC
Dselect1.test292 # ORDER BY expressions
295 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY f1}} msg]
299 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY -f1}} msg]
303 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1,f2)}} msg]
307 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1)}} msg]
311 # The restriction not allowing constants in the ORDER BY clause
315 # SELECT f1 FROM test1 ORDER BY 8.4;
317 #} {1 {ORDER BY terms must not be non-integer constants}}
320 # SELECT f1 FROM test1 ORDER BY '8.4';
322 #} {1 {ORDER BY terms must not be non-integer constants}}
[all …]
Dlimit.test41 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5}
44 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5 OFFSET 2}
47 execsql {SELECT x FROM t1 ORDER BY x+1 LIMIT 5 OFFSET -2}
50 execsql {SELECT x FROM t1 ORDER BY x+1 LIMIT 2, -5}
53 execsql {SELECT x FROM t1 ORDER BY x+1 LIMIT -2, 5}
56 execsql {SELECT x FROM t1 ORDER BY x+1 LIMIT -2, -5}
59 execsql {SELECT x FROM t1 ORDER BY x LIMIT 2, 5}
62 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5 OFFSET 5}
65 execsql {SELECT x FROM t1 ORDER BY x LIMIT 50 OFFSET 30}
68 execsql {SELECT x FROM t1 ORDER BY x LIMIT 30, 50}
[all …]
Dselect5.test35 execsql {SELECT DISTINCT y FROM t1 ORDER BY y}
41 execsql {SELECT y, count(*) FROM t1 GROUP BY y ORDER BY y}
44 execsql {SELECT y, count(*) FROM t1 GROUP BY y ORDER BY count(*), y}
47 execsql {SELECT count(*), y FROM t1 GROUP BY y ORDER BY count(*), y}
54 SELECT y, count(*) FROM t1 GROUP BY z ORDER BY y
59 SELECT y, count(*) FROM t1 GROUP BY temp.t1.y ORDER BY y
64 SELECT y, count(*) FROM t1 GROUP BY z(y) ORDER BY y
70 SELECT y, count(*) FROM t1 GROUP BY y HAVING count(*)<3 ORDER BY y
76 SELECT y, count(*) FROM t1 GROUP BY y HAVING z(y)<3 ORDER BY y
82 SELECT y, count(*) FROM t1 GROUP BY y HAVING count(*)<z ORDER BY y
[all …]
Dpcache.test142 SELECT * FROM t1 ORDER BY a; SELECT * FROM t1;
143 SELECT * FROM t2 ORDER BY a; SELECT * FROM t2;
144 SELECT * FROM t3 ORDER BY a; SELECT * FROM t3;
145 SELECT * FROM t4 ORDER BY a; SELECT * FROM t4;
146 SELECT * FROM t5 ORDER BY a; SELECT * FROM t5;
147 SELECT * FROM t6 ORDER BY a; SELECT * FROM t6;
148 SELECT * FROM t7 ORDER BY a; SELECT * FROM t7;
149 SELECT * FROM t8 ORDER BY a; SELECT * FROM t8;
150 SELECT * FROM t9 ORDER BY a; SELECT * FROM t9;
168 SELECT * FROM t1 ORDER BY a; SELECT * FROM t1;
[all …]
Ddescidx2.test130 cksort {SELECT a FROM t1 ORDER BY a}
133 cksort {SELECT a FROM t1 ORDER BY a ASC}
136 cksort {SELECT a FROM t1 ORDER BY a DESC}
139 cksort {SELECT b FROM t1 ORDER BY a}
142 cksort {SELECT b FROM t1 ORDER BY a ASC}
145 cksort {SELECT b FROM t1 ORDER BY a DESC}
148 cksort {SELECT a FROM t1 ORDER BY b}
151 cksort {SELECT a FROM t1 ORDER BY b ASC}
154 cksort {SELECT a FROM t1 ORDER BY b DESC}
157 cksort {SELECT b FROM t1 ORDER BY b}
[all …]

12345678910