以为是让算高质量的用户数,原来是算答题数,怪不得,写出来怎么都不对,求求以后写题意严谨点吧
select case when t2.author_level in (1,2) then '1-2级' when t2.author_level in (3,4) then '3-4级' else '5-6级' end as level_cut ,count(t1.author_id) as num from (select author_id from answer_tb where char_len>=100 ) t1 join author_tb t2 on t1.author_id=t2.author_id group by level_cut order by num desc;