OLD | NEW |
1 # 2004 Jun 27 | 1 # 2004 Jun 27 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 insert into a values('01','data01'); | 144 insert into a values('01','data01'); |
145 insert into a values('+1','data+1'); | 145 insert into a values('+1','data+1'); |
146 | 146 |
147 insert into b values ('01',1); | 147 insert into b values ('01',1); |
148 insert into b values ('01',2); | 148 insert into b values ('01',2); |
149 insert into b values ('+1',3); | 149 insert into b values ('+1',3); |
150 insert into b values ('+1',4); | 150 insert into b values ('+1',4); |
151 | 151 |
152 select a.*, x.* | 152 select a.*, x.* |
153 from a, (select key,sum(period) from b group by key) as x | 153 from a, (select key,sum(period) from b group by key) as x |
154 where a.key=x.key; | 154 where a.key=x.key order by 1 desc; |
155 } | 155 } |
156 } {01 data01 01 3 +1 data+1 +1 7} | 156 } {01 data01 01 3 +1 data+1 +1 7} |
157 | 157 |
158 # This test case tests the same property as misc4-4.1, but it is | 158 # This test case tests the same property as misc4-4.1, but it is |
159 # a bit smaller which makes it easier to work with while debugging. | 159 # a bit smaller which makes it easier to work with while debugging. |
160 do_test misc4-4.2 { | 160 do_test misc4-4.2 { |
161 execsql { | 161 execsql { |
162 CREATE TABLE ab(a TEXT, b TEXT); | 162 CREATE TABLE ab(a TEXT, b TEXT); |
163 INSERT INTO ab VALUES('01', '1'); | 163 INSERT INTO ab VALUES('01', '1'); |
164 } | 164 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 CREATE TABLE def(d, e, f, PRIMARY KEY(d, e)); | 202 CREATE TABLE def(d, e, f, PRIMARY KEY(d, e)); |
203 } | 203 } |
204 } {} | 204 } {} |
205 do_test misc4-6.2 { | 205 do_test misc4-6.2 { |
206 execsql { | 206 execsql { |
207 SELECT a FROM abc LEFT JOIN def ON (abc.a=def.d); | 207 SELECT a FROM abc LEFT JOIN def ON (abc.a=def.d); |
208 } | 208 } |
209 } {1} | 209 } {1} |
210 | 210 |
211 finish_test | 211 finish_test |
OLD | NEW |