select sum(case d.task_state when 0 then 1 else 0 end)/sum(1),
sum(case d.task_state when 0 then 1 else 0 end),
sum(1)
from week_task_result d 
这么写输出的结果是:0 23 24
其中第一列为0,而不是23除以24得到的值,为什么?