Subject Looking for explanation of count and group by
Author Bob Murdoch
Just ran across a situation that I can't explain. Not because anything is
wrong, just because I can't figure it out.

Given the table "create table test_group_by(column1 integer)"

I can run this query and receive a single row result set with a count of 0:

select
count(*)
from
test_group_by


However, if I change the query to

select
column1, count(*)
from
test_group_by
group by
column1

I recieve an empty result set. I think I would have expected a single row,
with column1=NULL and a count of 0.


tia,

Bob M..