select t.user_id, t.first_buy_date, t.num from
(select , count() over(partition by user_id) as num,
min(date) over(partition by user_id) as first_buy_date
from order_info
where product_name in ('C++','Java','Python')
and status='completed'
and date >'2025-10-15') t
where t.num >=2
group by t.user_id
开窗函数min()over(partition by ) 的用法