Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 417) sorted by relevance

12345678910>>...17

/sqlite-3.40.0/test/
H A Dcount.test20 # count-0.*: Make sure count(*) works on an empty database. (Ticket #3774)
29 do_test count-0.1 {
102 do_test count-2.1 {
108 do_test count-2.2 {
111 do_test count-2.3 {
114 do_test count-2.4 {
117 do_test count-2.5 {
120 do_test count-2.6 {
130 SELECT count(*) FROM t2 HAVING count(*)>1;
133 SELECT count(*) FROM t2 HAVING count(*)<10;
[all …]
H A Ddistinctagg.test27 SELECT count(distinct a),
28 count(distinct b),
29 count(distinct c),
30 count(all a) FROM t1;
35 SELECT b, count(distinct c) FROM t1 GROUP BY b
43 SELECT count(*), count(distinct a), count(distinct b) FROM t1
54 SELECT count(distinct) FROM t1;
110 SELECT a, count(DISTINCT b) FROM t1 GROUP BY a;
174 1 1 "SELECT count(*) FROM t3" 2
175 2 0 "SELECT count(*) FROM t1" 10
[all …]
H A Dunionvtab.test247 do_execsql_test 3.3 { SELECT count(*) FROM uu WHERE rowid <= 24 } {24}
282 do_execsql_test 3.6.8 { SELECT count(*) FROM uu WHERE rowid > 99 } {1}
311 do_execsql_test 3.10.1 { SELECT count(*) FROM uu WHERE a < 25 } {24}
312 do_execsql_test 3.10.2 { SELECT count(*) FROM uu WHERE a < 26 } {100}
313 do_execsql_test 3.10.3 { SELECT count(*) FROM uu WHERE a < 27 } {126}
314 do_execsql_test 3.10.4 { SELECT count(*) FROM uu WHERE a < 73 } {172}
315 do_execsql_test 3.10.5 { SELECT count(*) FROM uu WHERE a < 74 } {173}
316 do_execsql_test 3.10.6 { SELECT count(*) FROM uu WHERE a < 75 } {200}
317 do_execsql_test 3.10.7 { SELECT count(*) FROM uu WHERE a < 76 } {275}
318 do_execsql_test 3.10.8 { SELECT count(*) FROM uu WHERE a < 99 } {298}
[all …]
H A Dwherelimit.test81 execsql {SELECT count(*) FROM t1}
85 execsql {SELECT count(*) FROM t1}
90 execsql {SELECT count(*) FROM t1}
95 execsql {SELECT count(*) FROM t1}
103 execsql {SELECT count(*) FROM t1}
110 execsql {SELECT count(*) FROM t1}
115 execsql {SELECT count(*) FROM t1}
120 execsql {SELECT count(*) FROM t1}
125 execsql {SELECT count(*) FROM t1}
131 execsql {SELECT count(*) FROM t1}
[all …]
H A DwhereM.test33 SELECT count(*) FROM t1 WHERE a=10 AND a = '10.0'
36 SELECT count(*) FROM t1 WHERE a=10 AND a LIKE '10.0'
46 SELECT count(*) FROM t1 WHERE b=10 AND b = '10.0'
49 SELECT count(*) FROM t1 WHERE b=10 AND b LIKE '10.0'
55 SELECT count(*) FROM t1 WHERE b=10 AND b LIKE '10'
65 SELECT count(*) FROM t1 WHERE c=10 AND c = '10.0'
68 SELECT count(*) FROM t1 WHERE c=10 AND c LIKE '10.0'
74 SELECT count(*) FROM t1 WHERE c=10.0 AND c = '10.0'
84 SELECT count(*) FROM t1 WHERE d=10 AND d = '10.0'
87 SELECT count(*) FROM t1 WHERE d=10 AND d LIKE '10.0'
[all …]
H A Dselect5.test40 execsql {SELECT y, count(*) FROM t1 GROUP BY y ORDER BY y}
43 execsql {SELECT y, count(*) FROM t1 GROUP BY y ORDER BY count(*), y}
46 execsql {SELECT count(*), y FROM t1 GROUP BY y ORDER BY count(*), y}
53 SELECT y, count(*) FROM t1 GROUP BY z ORDER BY y
63 SELECT y, count(*) FROM t1 GROUP BY z(y) ORDER BY y
69 SELECT y, count(*) FROM t1 GROUP BY y HAVING count(*)<3 ORDER BY y
81 SELECT y, count(*) FROM t1 GROUP BY y HAVING count(*)<z ORDER BY y
94 # Run various aggregate functions when the count is zero.
103 SELECT count(x) FROM t1 WHERE x>100
175 SELECT count(x), y FROM t3 GROUP BY y ORDER BY 1
[all …]
H A Drandexpr1.test41count(*)-count(*)+ -count(*)*max( -t1.c))-max(f))) when -count(distinct 19) then ((count(*))) els…
44count(*)-count(*)+ -count(*)*max( -t1.c))-max(f))) when -count(distinct 19) then ((count(*))) els…
47count(*)-count(*)+ -count(*)*max( -t1.c))-max(f))) when -count(distinct 19) then ((count(*))) els…
1202count(distinct t1.e) | min(b))-cast(avg(c) AS integer) | case +~+max(t1.a)*abs(+~ - -+cast(avg(19*…
1205count(distinct t1.e) | min(b))-cast(avg(c) AS integer) | case +~+max(t1.a)*abs(+~ - -+cast(avg(19*…
1208count(distinct t1.e) & min(b))-cast(avg(c) AS integer) & case +~+max(t1.a)*abs(+~ - -+cast(avg(19*…
1892count(*)-abs(case cast(avg(19) AS integer) when count(distinct 19)*(count(*))-count(*) then count(…
1895count(*)-abs(case cast(avg(19) AS integer) when count(distinct 19)*(count(*))-count(*) then count(…
6152count(*))+max((select ~count(*)+count(distinct d)*~cast(avg(19) AS integer)+case count(*)- -abs(ab…
6155count(*))+max((select ~count(*)+count(distinct d)*~cast(avg(19) AS integer)+case count(*)- -abs(ab…
[all …]
H A Dwhere.test294 count {
300 count {
306 count {
312 count {
318 count {
324 count {
330 count {
339 count {
345 count {
351 count {
[all …]
H A Dselect3.test40 execsql {SELECT count(*) FROM t1}
116 SELECT log, count(*) FROM t1 GROUP BY;
125 SELECT log, count(*) FROM t1 HAVING log>=4
128 SELECT count(*) FROM t1 HAVING log>=4
131 SELECT count(*) FROM t1 HAVING log!=400
141 SELECT log, count(*) FROM t1
143 HAVING count(*)>=4
149 SELECT log, count(*) FROM t1
151 HAVING count(*)>=4
157 SELECT log AS x, count(*) AS y FROM t1
[all …]
H A Dwhere4.test42 SELECT count(*) FROM t1;
48 proc count sql {
59 count {SELECT rowid FROM t1 WHERE w IS NULL}
63 count {SELECT rowid FROM t1 WHERE w IS $null}
66 count {SELECT rowid FROM t1 WHERE +w IS NULL}
69 count {SELECT rowid FROM t1 WHERE w=1 AND x IS NULL}
72 count {SELECT rowid FROM t1 WHERE w=1 AND +x IS NULL}
75 count {SELECT rowid FROM t1 WHERE w=1 AND x>0}
78 count {SELECT rowid FROM t1 WHERE w=1 AND x<9}
90 count {SELECT rowid FROM t1 WHERE w=x'78' AND x IS NULL}
[all …]
H A Dminmax3.test23 proc count sql {
60 count { SELECT max(y) FROM t1 WHERE x = '2'; }
65 count { SELECT max(y) FROM t1 WHERE x = '2'; }
70 count { SELECT max(y) FROM t1 WHERE x = '2'; }
90 count { SELECT min(y) FROM t1 WHERE x = '2'; }
111 count { SELECT min(y) FROM t1; }
116 count { SELECT min(y) FROM t1; }
121 count { SELECT min(y) FROM t1; }
127 count { SELECT max(y) FROM t1; }
132 count { SELECT max(y) FROM t1; }
[all …]
H A Dselect6.test59 execsql {SELECT count(*) FROM (SELECT y FROM t1)}
74 FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
81 SELECT a.y, a.[count(*)], [max(x)], [count(*)]
82 FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
115 execsql {SELECT count(*) FROM (SELECT b FROM t2)}
130 FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a,
137 SELECT a.b, a.[count(*)], [max(a)], [count(*)]
242 SELECT [count(*)],y FROM (SELECT count(*), y FROM t1 GROUP BY y)
243 ORDER BY [count(*)]
248 SELECT [count(*)],y FROM (SELECT count(*), y FROM t1 GROUP BY y)
[all …]
H A De_delete.test200 SELECT count(*) FROM aux.t7
222 SELECT count(*) FROM temp.t7 UNION ALL SELECT count(*) FROM main.t7 UNION ALL
223 SELECT count(*) FROM aux.t7 UNION ALL SELECT count(*) FROM aux2.t7;
225 SELECT count(*) FROM main.t8 UNION ALL SELECT count(*) FROM aux.t8
228 SELECT count(*) FROM aux.t9 UNION ALL SELECT count(*) FROM aux2.t9;
230 SELECT count(*) FROM aux2.t10;
242 SELECT count(*) FROM temp.t7 UNION ALL SELECT count(*) FROM main.t7 UNION ALL
243 SELECT count(*) FROM aux.t7 UNION ALL SELECT count(*) FROM aux2.t7;
245 SELECT count(*) FROM main.t8 UNION ALL SELECT count(*) FROM aux.t8
248 SELECT count(*) FROM aux.t9 UNION ALL SELECT count(*) FROM aux2.t9;
[all …]
H A Dintpkey.test265 count {
270 count {
275 count {
285 count {
291 count {
296 count {
301 count {
309 count {
314 count {
319 count {
[all …]
H A De_select.test95 SELECT count(*) FROM t1 %JOIN% t2
167 0102.1 "SELECT count(*), max(a) FROM t1 GROUP BY b HAVING count(*)=1" {
170 0102.2 "SELECT count(*), max(a) FROM t1 GROUP BY b HAVING count(*)=2" {}
328 4 "SELECT count(*)" {1}
329 5 "SELECT count(*) WHERE 0" {0}
330 6 "SELECT count(*) WHERE 1" {1}
353 2 "SELECT count(*), count(x), count(y) FROM xx" {3 2 3}
471 SELECT count(*) FROM x1 %JOIN% x2
479 SELECT count(*) FROM x2 %JOIN% x3
905 1 "SELECT count(a), max(a), count(b), max(b) FROM z1" {5 63 5 born}
[all …]
H A Dinsert2.test45 INSERT INTO t1 SELECT log, count(*) FROM d1 GROUP BY log;
61 SELECT log, count(*) FROM d1 GROUP BY log
76 SELECT log, count(*) FROM d1 GROUP BY log
158 SELECT count(*) FROM t4;
170 SELECT count(*) FROM t4;
181 SELECT count(*) FROM t4;
191 SELECT count(*) FROM t4;
199 SELECT count(*) from t4;
206 SELECT count(*) from t4;
213 SELECT count(*) FROM t4;
[all …]
H A Dscanstatus.test54 SELECT count(*) FROM t1, t2;
63 SELECT count(*) FROM t1, t2 WHERE t2.rowid>1;
72 SELECT count(*) FROM t1, t2 WHERE t2.rowid>1;
213 SELECT count(*) FROM a1 AS x, a1 AS y
322 SELECT count(*) FROM t1 WHERE a IN (0, 1)
330 SELECT count(*) FROM t2 WHERE y = 'j';
333 SELECT count(*) FROM t2 WHERE y = 'j';
341 SELECT count(*) FROM t1, t2 WHERE y = c;
348 SELECT count(*) FROM t1, t2 WHERE y = c;
358 SELECT count(*) FROM t1, t3 WHERE y = c;
[all …]
H A Dwalfault.test83 SELECT count(*) FROM x
89 execsql { SELECT count(*) FROM x }
94 execsql { SELECT count(*) FROM x }
184 SELECT count(*) FROM t1;
224 execsql { SELECT count(*) FROM t1 }
252 execsql { SELECT count(*) FROM t1 }
281 SELECT count(*) FROM abc;
321 SELECT count(*) FROM abc;
412 db eval { SELECT count(*) FROM abc }
476 db eval { SELECT count(*) FROM abc }
[all …]
H A Dfts4opt.test72 SELECT level, count(*) FROM t2_segdir GROUP BY level
85 SELECT level, count(*) FROM t2_segdir GROUP BY level
100 execsql { SELECT level, count(*) FROM t2_segdir GROUP BY level }
106 SELECT level, count(*) FROM t2_segdir GROUP BY level;
133 SELECT level, count(*) FROM t2_segdir GROUP BY level
146 SELECT level, count(*) FROM t2_segdir GROUP BY level
161 execsql { SELECT level, count(*) FROM t2_segdir GROUP BY level }
167 SELECT level, count(*) FROM t2_segdir GROUP BY level;
180 SELECT count(*) FROM fts_segdir;
/sqlite-3.40.0/src/
H A Dhash.c26 pNew->count = 0; in sqlite3HashInit()
49 pH->count = 0; in sqlite3HashClear()
80 pEntry->count++; in insertElement()
162 count = pEntry->count; in findElementWithHash()
166 count = pH->count; in findElementWithHash()
169 while( count-- ){ in findElementWithHash()
202 pEntry->count--; in removeElementGivenHash()
205 pH->count--; in removeElementGivenHash()
206 if( pH->count==0 ){ in removeElementGivenHash()
260 pH->count++; in sqlite3HashInsert()
[all …]
/sqlite-3.40.0/ext/fts3/
H A Dfts3_hash.c65 pNew->count = 0; in sqlite3Fts3HashInit()
91 pH->count = 0; in sqlite3Fts3HashClear()
185 pEntry->count++; in fts3HashInsertElement()
233 count = pEntry->count; in fts3FindElementByHash()
266 pEntry->count--; in fts3RemoveElementByHash()
267 if( pEntry->count<=0 ){ in fts3RemoveElementByHash()
274 pH->count--; in fts3RemoveElementByHash()
275 if( pH->count<=0 ){ in fts3RemoveElementByHash()
277 assert( pH->count==0 ); in fts3RemoveElementByHash()
357 pH->count = 0; in sqlite3Fts3HashInsert()
[all …]
/sqlite-3.40.0/ext/fts2/
H A Dfts2_hash.c67 pNew->count = 0; in sqlite3Fts2HashInit()
93 pH->count = 0; in sqlite3Fts2HashClear()
187 pEntry->count++; in insertElement()
232 count = pEntry->count; in findElementGivenHash()
265 pEntry->count--; in removeElementGivenHash()
266 if( pEntry->count<=0 ){ in removeElementGivenHash()
273 pH->count--; in removeElementGivenHash()
274 if( pH->count<=0 ){ in removeElementGivenHash()
276 assert( pH->count==0 ); in removeElementGivenHash()
356 pH->count++; in sqlite3Fts2HashInsert()
[all …]
/sqlite-3.40.0/ext/fts1/
H A Dft_hash.c51 pNew->count = 0; in HashInit()
79 pH->count = 0; in HashClear()
222 pEntry->count++; in insertElement()
267 count = pEntry->count; in findElementGivenHash()
300 pEntry->count--; in removeElementGivenHash()
301 if( pEntry->count<=0 ){ in removeElementGivenHash()
308 pH->count--; in removeElementGivenHash()
309 if( pH->count<=0 ){ in removeElementGivenHash()
311 assert( pH->count==0 ); in removeElementGivenHash()
386 pH->count++; in HashInsert()
[all …]
H A Dfts1_hash.c58 pNew->count = 0; in sqlite3Fts1HashInit()
86 pH->count = 0; in sqlite3Fts1HashClear()
180 pEntry->count++; in insertElement()
225 count = pEntry->count; in findElementGivenHash()
258 pEntry->count--; in removeElementGivenHash()
259 if( pEntry->count<=0 ){ in removeElementGivenHash()
266 pH->count--; in removeElementGivenHash()
267 if( pH->count<=0 ){ in removeElementGivenHash()
269 assert( pH->count==0 ); in removeElementGivenHash()
349 pH->count++; in sqlite3Fts1HashInsert()
[all …]
/sqlite-3.40.0/ext/fts5/test/
H A Dfts5rowid.test69 set res [db one {SELECT count(*) FROM x1_data}]
71 SELECT count(fts5_decode(rowid, block)) FROM x1_data;
76 SELECT count(fts5_decode(rowid, block)) FROM x1_data;
84 set res [db one {SELECT count(*) FROM x1_data}]
86 SELECT count(fts5_decode(rowid, block)) FROM x1_data;
92 # SELECT count(fts5_decode(rowid, block)) FROM x1_data;
124 set res [db one {SELECT count(*) FROM x2_data}]
126 SELECT count(fts5_decode(rowid, block)) FROM x2_data;
155 set res [db one {SELECT count(*) FROM x3_data}]
157 SELECT count(fts5_decode(rowid, block)) FROM x3_data;
[all …]

12345678910>>...17