select id,t1.user_id user_id,product_name,status,client_id,date from (select id,user_id,product_name,status,client_id,date from order_info where date>"2025-10-15" and status='completed' and product_name in ('C++','Python','Java')) t1 left join (select user_id,count(user_id) c from order_info where date>"2025-10-15" and status='completed' and product_name in ('C++','Python','Java') group by user_id having count(user_id)>=2) t2 on t1.user_id=t2.user_id where c>=2