select id,is_group_buy,name from (select id,is_group_buy,name,max(rn) over(partition by user_id) mx from ( select t1.id, t1.user_id, t1.is_group_buy, t2.name, row_number() over(partition by user_id order by t1.date) rn from order_info t1 left join client t2 on t1.client_id = t2.id where t1.date &g...