select shop_no from (select *, rank() over(partition by shop_no order by order_date) as `date_rank` from orders where order_num > 100) t group by t.shop_no, date_sub(t.order_date, interval t.date_rank day) having count(1) > 2