代码:
SELECT
count(*) as count,
sum(Status = 'test1') as count_test1,
sum(Status = 'test2') as count_test2
FROM Table
WHERE Type = 'test'
结果我看到:
count count_test1 count_test2
0 NULL NULL
请告诉我,是否有可能使显示 0 而不是 NULL?
PS:结果是:
count count_test1 count_test2
0 0 0