题解 | #某乎问答高质量的回答中用户属于各级别的数量#
某乎问答高质量的回答中用户属于各级别的数量
http://www.nowcoder.com/practice/69c85db3e59245efb7cee51996fe2273
SELECT level_cut,COUNT(issue_id) num FROM( SELECT issue_id, CASE WHEN author_level BETWEEN 1 AND 2 THEN '1-2级' WHEN author_level BETWEEN 3 AND 4 THEN '3-4级' ELSE '5-6级' END AS level_cut FROM author_tb JOIN answer_tb USING(author_id) WHERE char_len>=100 )t2 GROUP BY level_cut ORDER BY num DESC;
不是计算用户数量
而是回答的数量