Untested (Obviously as I don't have your schema)
select max(WheverYourIDFieldIs)-count(WhateverYourIDFieldIs) as "Not Used"
from teaInStock group by WhateverYouIDFieldIs
On Tue, Sep 5, 2017 at 3:45 PM, Cecil Westerhof <cldwester...@gmail.com>
> It is not very important, but I am just curious. I need to know how many
> records are not yet used. I do that with:
> SELECT COUNT(*) - COUNT("Last Used") AS "Not Used"
> FROM teaInStock
> Is that the correct way, or is there a better way?
> Cecil Westerhof
> sqlite-users mailing list
sqlite-users mailing list