with t as( select distinct user_id, count(product_name) over(partition by user_id) cnt from order_info where status='completed' and date>'2025-10-15' ) select o.id, is_group_buy, c.name client_name from order_info o left join client c on o.client_id=c.id left join t on o.user_id=t.user_id where status='completed' and date>'2025-10-15' and t.cnt>=2 and product_name in ('C++','Python','Java') order by o.id