select user_id,
min(date)
as first_buy_date,
max(date)
as second_buy_date,
cnt
from (select user_id,date,count(1) over w as cnt,row_number() over (w order by date) t_rank from order_info where status='completed' and date >'2025-10-15' and product_name in ('Java','Python','C++') 
window w as(partition by user_id))r1 where cnt>=2 and t_rank in(1,2) group by user_id

找不到工作,挨饿