2017-09-05 22:46 GMT+02:00 R Smith <rsm...@rsweb.co.za>: > > > On 2017/09/05 10:13 PM, John McKown wrote: > >> On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski <pontia...@gmail.com> >> wrote: >> >> On behalf of Cecil, the fault in that logic is that count(*) returns the >>> number of rows in that table, not whether there is a hole "somewhere: >>> Your >>> query will either return 1, or, 0. >>> >>> >>> I either don't understand you, or I am doing something wrong. I used "a" >> instead of "Last Used" in my example because I'm just plain lazy. >> > > I think Stephen assumed the OP meant that he wanted to know the number of > "holes" (i.e. skipped IDs) in the DB, which I thought was obviously not > what the OP wanted, until the OP mentioned his Tea column cannot have NULL > values, so now I'm slightly lost and Stephen's interpretation seems more > sensible, but then the OP said that Igor's solution is working for him, > which should only work if there are NULL values... so yes, I am very much > confused as to exactly what goes on now.
The Tea column cannot have NULL, but "Last Used" can. :-D I want to know how many teas are not used yet. -- Cecil Westerhof _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users