Lines Matching refs:min
13 # aggregate min() and max() functions and which are handled as
14 # as a special case. This file makes sure that the min/max
55 execsql {SELECT min(x) FROM t1}
70 execsql {SELECT min(x) FROM t1}
96 execsql {SELECT min(a) FROM t2}
143 SELECT coalesce(min(x+0),-1), coalesce(max(x+0),-1) FROM
163 # Make sure the min(x) and max(x) optimizations work on empty tables
169 SELECT coalesce(min(x),999) FROM t3;
174 SELECT coalesce(min(rowid),999) FROM t3;
193 # Make sure the min(x) and max(x) optimizations work when there
198 SELECT min(a) FROM t2 LIMIT 1
208 SELECT min(a) FROM t2 LIMIT 0,100
218 SELECT min(x) FROM t3 LIMIT 1
232 # Make sure the max(x) and min(x) optimizations work for nested
249 SELECT min(x) FROM t1;
255 SELECT * FROM (SELECT min(x) FROM t1);
260 # Make sure min(x) and max(x) work correctly when the datatype is
269 SELECT min(a), max(a) FROM t4;
278 SELECT min(a), max(a) FROM t5;
282 # Ticket #658: Test the min()/max() optimization when the FROM clause
307 # If there is a NULL in an aggregate max() or min(), ignore it. An
308 # aggregate min() or max() will only return NULL if all values are NULL.
316 SELECT coalesce(min(x),-1) FROM t6;
327 SELECT coalesce(min(x),-1) FROM t6;
349 SELECT (SELECT min(x) FROM t6), (SELECT max(x) FROM t6);
355 SELECT min(x), max(x) FROM t6;
381 SELECT (SELECT min(x) FROM t6), (SELECT max(x) FROM t6);
387 SELECT min(x), max(x) FROM t6;
391 # 2017-10-26. Extend the min/max optimization to indexes on expressions
411 SELECT a, min(b+c) FROM t11;
414 db eval {SELECT min(b+c) FROM t11}
418 db eval {SELECT min(c+b) FROM t11}
423 SELECT a, min(b+c) FROM t11;