【 以下文字转载自 Statistics 讨论区 】
发信人: j1123 (2134), 信区: Statistics
标 题: [Mysql] how to return NULL count in group by query
发信站: BBS 未名空间站 (Wed Jun 30 09:45:08 2010, 美东)
I have a table like this:
color size fruit
red big apple
red small apple
green big apple
yellow small orange
red small orange
when I do:
select color, size, count(*) group by color, size;
I got:
red big 1
red small 2
green big 1
yellow small 1
but what I need is to also return the NULL group count su