题解 | #某乎问答高质量的回答中用户属于各级别的数量#
某乎问答高质量的回答中用户属于各级别的数量
http://www.nowcoder.com/practice/69c85db3e59245efb7cee51996fe2273
select
(case when au.author_level = 1 or au.author_level = 2 then "1-2级"
when au.author_level = 3 or au.author_level = 4 then "3-4级"
when au.author_level = 5 or au.author_level = 6 then "5-6级" end) level_cut,
count(1) num
from author_tb au inner join answer_tb an on au.author_id = an.author_id
where an.char_len >= 100
group by level_cut
order by num desc