题解 |最大连续回答问题天数大于等于3天的用户及其对应等级
某乎问答最大连续回答问题天数大于等于3天的用户及其对应等级
https://www.nowcoder.com/practice/e080f8a685bc4af3b47749ca3310f1fd
# 以author_id分组,将回答天数>=3天的删选出来,之后再看是否连续(将日期放到一个字符串中?) select a.author_id, author_level, answer_days from ( select count(distinct answer_date) as answer_days, author_id from answer_tb group by author_id having answer_days >= 3 ) as a left join author_tb as b on a.author_id = b.author_id order by author_id;