select * from order_info 
where id in
(select if (count(user_id) over(partition by user_id) >= 2, id, 0) from order_info 
    where date >= '2025-10-15'
    and product_name in ('C++', 'Java', 'Python')
    and status = 'completed'
    order by id) 

短,好理解,但是好像挺花时间内存。