select user_id,date first_buy_date,c cnt from(select *,row_number()over(partition by user_id order by date) rn from(select *,count(user_id)over(partition by user_id) c from order_info where date>"2025-10-15" and status='completed' and product_name in ('C++','Python','Java')) t where c>=2) t1 where rn=1