Home
last modified time | relevance | path

Searched refs:select (Results 1 – 25 of 114) sorted by relevance

12345

/sqlite-3.40.0/test/
H A Drandexpr1.test1187select max(t1.e-c) from t1 where f=(abs(coalesce((select t1.c from t1 where not (not exists(select
1190select max(t1.e-c) from t1 where f=(abs(coalesce((select t1.c from t1 where not (not exists(select
2213select e from t1 where coalesce((select coalesce((select max( -coalesce((select max(case when exis…
3515select (select abs(cast(avg(17-11+e*t1.d) AS integer)++cast(avg(coalesce((select max(11-+t1.f- -e-…
4901select case when coalesce((select max(coalesce((select max(e-c-coalesce((select max(c) from t1 whe…
4904select case when coalesce((select max(coalesce((select max(e-c-coalesce((select max(c) from t1 whe…
4907select case when coalesce((select max(coalesce((select max(e-c-coalesce((select max(c) from t1 whe…
4979select 1 from t1 where 17>=19) or t1.c in (select min(19)-(cast(avg(f) AS integer)) from t1 union
4982select 1 from t1 where 17>=19) or t1.c in (select min(19)-(cast(avg(f) AS integer)) from t1 union
7349 …e((select t1.a from t1 where c in (select a from t1 union select t1.a*f from t1) and t1.b in (sele…
[all …]
H A Dtrigger4.test35 select * from test1;
40 select * from test2;
48 select * from test1;
53 select * from test2;
65 select * from test1;
70 select * from test2;
78 select * from test1;
83 select * from test2;
107 select * from test1;
114 select * from test1;
[all …]
H A Dnull.test34 select * from t1;
42 select ifnull(a+b,99) from t1;
119 select a from t1 where b<10
164 select b from t1 union select c from t1 order by b;
169 select b from t1 union select c from t1 order by 1;
174 select b from t1 union select c from t1 order by t1.b;
179 select b from t1 union select c from t1 order by main.t1.b;
184 select b from t1 union select c from t1 order by t1.a;
189 select b from t1 union select c from t1 order by main.t1.a;
204 select a from t2;
[all …]
H A Dlastinsert.test110 select val1 from t2;
117 select val2 from t2;
124 select val3 from t2;
149 select val1 from t2;
156 select val2 from t2;
163 select val3 from t2;
191 select val1 from t2;
198 select val2 from t2;
205 select val3 from t2;
233 select val1 from t2;
[all …]
H A Dmain.test332 catchsql {select 'abc}
335 catchsql {select "abc}
338 catchsql {select [abc}
341 catchsql {select x'4869}
344 catchsql {select x'4869'}
353 catchsql {select $abc(}
356 catchsql {select $abc(x}
360 catchsql {select $::xyz}
369 catchsql {select $(abc)}
436 catchsql {select 123/}
[all …]
H A Dbestindex7.test64 do_execsql_test 1.1 { select * from vt1 } {0 2}
65 do_execsql_test 1.2 { select * from vt1 WHERE a=0 } {0}
66 do_execsql_test 1.3 { select * from vt1 WHERE a=1 } {}
67 do_execsql_test 1.4 { select * from vt1 WHERE a=1 OR a=0} {0}
73 do_execsql_test 1.6 { select * from vt1 } {0 {}}
74 do_execsql_test 1.7 { select * from vt1 WHERE a=0 } {0}
75 do_execsql_test 1.8 { select * from vt1 WHERE a=1 } {}
76 do_execsql_test 1.9 { select * from vt1 WHERE a=1 OR a=0} {0}
77 do_execsql_test 1.10 { select * from vt1 WHERE a IN (2) } {}
78 do_execsql_test 1.10 { select * from vt1 WHERE a IN (0,1,2,3) } {0}
[all …]
H A Dlaststmtchanges.test78 select changes();
86 select changes();
114 select changes();
121 select v1 from t2;
128 select v2 from t2;
157 select changes();
189 select changes();
251 select changes();
258 select changes();
265 select changes();
[all …]
H A Dtkt2192.test42 select * from records where type = 'D/D';
45 select strftime('%Y-%m', date) as date, (-1 * sum(value)) as value
51 select strftime('%Y-%m', date) as date, (-1 * sum(value)) as value
57 select strftime('%Y-%m', date) as date, (-1 * sum(value)) as value
65 select strftime('%Y-%m', date) as date, (-1 * sum(value)) as value
72 select 'Energy' as expense, date, value from energy
76 select 'Credit Card' as expense, date, value from credit_cards;
79 select 'jan', expense, value from expense_overview
83 select 'nov', expense, value from expense_overview
87 select * from jan join nov on (jan.expense = nov.expense);
[all …]
H A Dcountofview.test28 select c from t2 union all select f from t3 limit 1 offset 1
32 select count(*) from (
33 select c from t2 union all select f from t3 limit 1 offset 1
38 select count(*) from (
39 select c from t2 union all select f from t3
H A Drollback2.test42 # -select SELECT to execute after -setup script
43 # -result Expected result of -select statement
45 # rollback the transaction in the middle of the -select statment
50 set A(-select) ""
66 db eval $A(-select) x {
80 } -select {
93 } -select {
108 } -select {
120 } -select {
138 } -select {
[all …]
H A Djoin4.test35 select * from t1 left outer join t2 on t1.a=t2.x where t2.z='ok'
52 select * from t1 left outer join t2 on t1.a=t2.x where t2.z='ok'
58 select * from t1 left outer join t2 on t1.a=t2.x and t2.z='ok'
66 select * from t1 left outer join t2 on t1.a=t2.x where t2.z='ok'
71 select * from t1 left outer join t2 on t1.a=t2.x and t2.z='ok'
76 select * from t1 left outer join t2 on t1.a=t2.x where t2.z>='ok'
81 select * from t1 left outer join t2 on t1.a=t2.x and t2.z>='ok'
87 select * from t1 left outer join t2 on t1.a=t2.x where t2.z IN ('ok')
92 select * from t1 left outer join t2 on t1.a=t2.x and t2.z IN ('ok')
H A Dcapi2.test157 sqlite3_prepare $DB {select bogus from sqlite_master} -1 TAIL
163 sqlite3_prepare $DB {select bogus from } -1 TAIL
175 sqlite3_prepare $DB {select bogus from sqlite_master;x;} -1 TAIL
187 sqlite3_prepare $DB {select 5/0;} -1 TAIL
746 check_origins {select * from (select * from view1)}
749 check_origins {select * from (select * from (select * from view1))}
755 check_origins {select * from (select * from (select * from view1))}
783 check_origins {select * from (select * from view2)}
786 check_origins {select * from (select * from (select * from view2))}
792 check_origins {select * from (select * from (select * from view2))}
[all …]
H A Drandexpr1.tcl61 {(select AGG from t1)}
65 {coalesce((select max(EXPR) from t1 where BOOL),EXPR)}
69 {coalesce((select EXPR from t1 where BOOL),EXPR)}
101 {EXPR in (select EXPR from t1 union select EXPR from t1)}
105 {EXPR in (select AGG from t1 union select AGG from t1)}
109 {exists(select 1 from t1 where BOOL)}
113 {not exists(select 1 from t1 where BOOL)}
H A Dcollate5.test126 SELECT a FROM collate5t1 UNION select a FROM collate5t2;
131 SELECT a FROM collate5t2 UNION select a FROM collate5t1;
136 SELECT a, b FROM collate5t1 UNION select a, b FROM collate5t2;
141 SELECT a, b FROM collate5t2 UNION select a, b FROM collate5t1;
147 SELECT a FROM collate5t1 EXCEPT select a FROM collate5t2;
152 SELECT a FROM collate5t2 EXCEPT select a FROM collate5t1 WHERE a != 'a';
157 SELECT a, b FROM collate5t1 EXCEPT select a, b FROM collate5t2;
162 SELECT a, b FROM collate5t2 EXCEPT select a, b FROM collate5t1
169 SELECT a FROM collate5t1 INTERSECT select a FROM collate5t2;
179 SELECT a, b FROM collate5t1 INTERSECT select a, b FROM collate5t2;
[all …]
H A Dtkt3419.test44 select * FROM a, b, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
49 select * FROM a, c, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
54 select * FROM b, a, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
59 select * FROM b, c, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
64 select * FROM c, a, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
69 select * FROM c, b, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
H A Dzeroblob.test183 execsql {select zeroblob(-1)}
186 execsql {select zeroblob(-10)}
189 execsql {select zeroblob(-100)}
192 execsql {select length(zeroblob(-1))}
195 execsql {select zeroblob(-1)|1}
198 catchsql {select length(zeroblob(2147483648))}
201 catchsql {select zeroblob(2147483648)}
204 execsql {select hex(zeroblob(-1))}
207 execsql {select typeof(zeroblob(-1))}
H A Dmisc4.test152 select a.*, x.*
153 from a, (select key,sum(period) from b group by key) as x
166 select * from ab, (select b from ab) as x where x.b = ab.a;
182 create view myview as select t4.a a from t4 inner join t5 on t4.a=t5.a;
183 create table problem as select * from myview;
186 select * FROM problem;
191 create table t6 as select * from t4, t5;
192 select * from t6;
H A Dselect7.test31 select * from t1 where x like 'a__'
32 intersect select * from t1 where x like '_m_'
33 intersect select * from t1 where x like '__x';
117 } {1 {sub-select returns 2 columns - expected 1}}
122 } {1 {sub-select returns 2 columns - expected 1}}
127 } {1 {sub-select returns 2 columns - expected 1}}
132 } {1 {sub-select returns 2 columns - expected 1}}
136 # compound select statement.
H A Dnormalize.test22 {select*from t1 where a in(?,?,?)and b=?;}
26 {select a,b+?,c from t1 where d not in(select x from t2);}
34 {select?,b from t1 where d in(with t(a)as(values(?))select a from t)or e=?;}
44 {select?,b from t1 where d in(with t(a)as(values(?))select a from t)or e=?;}
49 {select x,?,y,?,z,?,w from t1;}
54 {select?in(?,?,?);}
62 {select a,?,b from t1 where c is not null or d is null or e=?;}
67 {select*from t1 where x in(?,?,?);}
H A Dmisc5.test51 insert or ignore into t2 select x*2 from t2;
52 insert or ignore into t2 select x*4 from t2;
57 insert or ignore into t2 select x-1 from t2;
58 insert or ignore into t2 select x+1 from t2;
59 insert or ignore into t2 select -x from t2;
60 select count(*) from t2;
70 insert into t2_temp select x*2 from t2_temp;
71 insert into t2_temp select x*4 from t2_temp;
78 insert into t2_temp select -x from t2_temp;
82 select count(*) from t2;
[all …]
H A Dbestindex6.test97 select * from t2 left join t1 on t1.id=t2.ctx where t1.value is null;
101 select * from vt2 left join vt1 on vt1.id=vt2.ctx where vt1.value is null;
106 select * from vt2 left join vt1 on vt1.id=vt2.ctx where vt1.value is $xxx;
110 select * from t2 left join vt1 on vt1.id=t2.ctx where vt1.value = 3
H A Dselect9.test94 # <simple select 1> <compound op> <simple select 2> ORDER BY <order by>
96 # where each <simple select> is a simple (non-compound) select statement
99 # This proc calls [test_compound_select] twice, once with the select
101 # of <select statement 1> and <select statement 2> exchanged.
106 set select [string trim $sql]
108 set rc [regexp $RE $select -> s1 op s2 order_by]
109 if {!$rc} {error "Statement is unflippable: $select"}
272 # except that the simple select statements have WHERE clauses attached
418 # Testing to make sure that queries involving a view of a compound select
H A Dwith3.test232 cte1(x, y) AS ( select 1, 2, 3 ),
233 cte2(z) as ( select 1 from cte1 )
234 select * from cte2, cte1;
239 cte1(x, y) AS ( select 1, 2, 3 ),
240 cte2(z) as ( select 1 from cte1 UNION ALL SELECT z+1 FROM cte2 WHERE z<5)
241 select * from cte2, cte1;
H A Dtypes.test211 set root [db eval {select rootpage from sqlite_master where name = 't1'}]
216 set root [db eval {select rootpage from sqlite_master where name = 't1'}]
239 set root [db eval {select rootpage from sqlite_master where name = 't2'}]
244 set root [db eval {select rootpage from sqlite_master where name = 't2'}]
264 set root [db eval {select rootpage from sqlite_master where name = 't3'}]
291 set root [db eval {select rootpage from sqlite_master where name = 't4'}]
296 set root [db eval {select rootpage from sqlite_master where name = 't4'}]
H A Dsort.test231 select a from t3 order by b, a;
236 select a from t3 order by b, a desc;
241 select a from t3 order by b desc, a;
246 select a from t3 order by b desc, a desc;
253 select a from t3 order by b, a;
258 select a from t3 order by b, a desc;
263 select a from t3 order by b desc, a;
268 select a from t3 order by b desc, a desc;
452 select y from t8, t9 where a=1 order by a, y;
468 select a.id, b.id, b.text from a join b on (a.id = b.aId)

12345