with t1 as( select p.product_id, p.shop_id, p.in_price, o.event_time, o.total_cnt, o.total_amount, d.order_id, d.price, d.cnt from tb_order_detail d join tb_order_overall o using(order_id) join tb_product_info p using(product_id) where shop_id = 901 and status = 1 and event_time >= '2021-10-01'),...