我有一个查询,其提供在数据库中用于事物不同类别的细分:在SQL分组空和空值作为一个
select categories, count(*) from products
group by categories
的有关资料是这样的:
NULL 56
42
FooCategory 12
BlahCategory 2
我想团体NULL
和<blank>
NoCategory 98
FooCategory 12
BlahCategory 2
这对我来说很好,t我很可能会修整列并将其与空字符串进行比较以匹配“'或全部空格。 – JAQFrost
是的,你可以用任何你想要的条件来扩展它 – Beth