I agarre. 😁
Mensaje original De: R Smith Fecha:
5/9/17 4:11 PM (GMT-05:00) A: sqlite-users@mailinglists.sqlite.org Asunto:
Re: [sqlite] Getting number of rows with NULL
On 2017/09/05 10:00 PM, Stephen Chrzanowski wrote:
> On behalf of Cecil, the fault in that logic is t
2017-09-05 22:46 GMT+02:00 R Smith :
>
>
> On 2017/09/05 10:13 PM, John McKown wrote:
>
>> On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
>> 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 "so
On 2017/09/05 10:13 PM, John McKown wrote:
On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
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
2017-09-05 22:09 GMT+02:00 Igor Tandetnik :
> It's possible I misunderstand what it is the OP is trying to do. But in
> any case, the query I show is equivalent to the query the OP has shown
> (which, apparently, does what they want), except formulated in a less
> roundabout way.
Yes, your quer
On 9/5/2017 4:05 PM, Igor Tandetnik wrote:
On 9/5/2017 4:00 PM, Stephen Chrzanowski wrote:
select count(*) from teaInStock where "Last Used" IS NULL;
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:
On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
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 doin
On 2017/09/05 10:00 PM, Stephen Chrzanowski 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.
Perhaps this is the opportune moment to learn. Test the theo
As I understand the requirements, he wants to find out how many entries
(Not which entries) don't exist between the first ID (Assumed 1) and max ID
value. So if he's got 3 rows, but max ID is 5, the result should be 2.
But I also suspect you're better in tune with the requirements, since I
suspec
2017-09-05 21:55 GMT+02:00 Igor Tandetnik :
> On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
>
>> 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 t
On 9/5/2017 4:00 PM, Stephen Chrzanowski wrote:
select count(*) from teaInStock where "Last Used" IS NULL;
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.
Wh
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.
On Tue, Sep 5, 2017 at 3:55 PM, Igor Tandetnik wrote:
> On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
>
>> It is
On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
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?
Why not be expl
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
wrote:
> It is not very important, but I am just curious. I need to know how
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
__
14 matches
Mail list logo