with temp1 as( select order_id,uid ,event_time,status,row_number()over(partition by uid order by event_time) rk,total_amount from tb_order_overall), temp2 as ( select order_id,uid ,total_amount from temp1 where rk=1 and year(event_time) = 2021 and month(event_time) = 10 and status = 1), temp3 as( se...