利用窗口函数count()统计出符合条件的总数, 再进行条件删选r>=2 排序后得到答案 SELECTa.id,a.user_id,a.product_name,a.status,a.client_id,a.dateFROM(SELECT*,count(product_name) over(partition by user_id) rfrom order_infowhere status='completed'and date>'2025-10-15'and product_name in('C++','Java','Python'))awhere a.r>=2order ...