select t2.author_id, t3.author_level, t2.days_cnt from (select author_id,count(1) as days_cnt from (select distinct answer_date, author_id, dense_rank() over(partition by author_id order by answer_date) as rk from answer_tb) t1 group by t1.author_id,date_sub(t1.answer_date,interval rk day) having count(1)>=3) t2 left join author_tb t3 on t2.author_id=t3.author_id order by t2.author_id