select round(avg(total_amount),1), round(avg(b-total_amount),1) from (select order_id, total_amount from( select order_id, uid, event_time, total_amount, min(event_time)over(partition by uid) a from tb_order_overall) as tb1 where a=event_time and date_format(event_time,'%Y%m')='202110') as tb2 left ...