题解 | #某乎问答高质量的回答中用户属于各级别的数量#
某乎问答高质量的回答中用户属于各级别的数量
http://www.nowcoder.com/practice/69c85db3e59245efb7cee51996fe2273
select case when t1.author_level in (1,2) then '1-2级' when t1.author_level in (3,4) then '3-4级' when t1.author_level in (5,6) then '5-6级' else ' ' end lecel_cut ,count(char_len) num from author_tb t1 join answer_tb t2 on t1.author_id=t2.author_id where char_len>=100 group by lecel_cut order by num desc#1-6级高质量回答(char_len>=100)分别是多少
#使用 case when