select app_work_type,
sum(case
when app_level = '0' then
1
else
0
end) as a,
sum(case
when app_level = '1' then
1
else
0
end) as b,
sum(case
when app_level = '2' then
1
else
0
end) as c,
sum(case
when app_level = '3' then
1
else
0
end) as d,
sum(a+b+c+d)as total
from t_authenticate_reg
group by app_work_type;
为什么会有标识符无效,就是那个‘d’