回答数为0 的不显示,题目应该更严谨
select case when author_level between 5 and 6 then "5-6级"
when author_level between 3 and 4 then "3-4级"
else "1-2级" end as level_cut,
sum(if(char_len>=100,1,0)) as num
from answer_tb left join author_tb using(author_id)
group by level_cut
having num !=0
order by num desc