select distinct a.user_id,
date as first_buy_date,
num as cnt
from (
    select user_id,count(*) over(partition by user_id ) as num,
    row_number() over(partition by user_id order by date) as date_rk,date
    from order_info
    where date>'2025-10-15'
    and status ='completed'
    and (product_name ='C++' or product_name ='Java' or product_name ='Python')
)a
where a.num>=2
and a.date_rk=1
order by a.user_id

好长的一道题就是说,,,不过居然一次就过了,可喜可贺