select d.id,d.is_group_buy, (case when d.is_group_buy ='No' then c.name else NULL end) as client_name from (select b.client_id,b.id,b.is_group_buy from (select client_id,id,count(*) over(partition by user_id ) as num, is_group_buy from order_info where date>'2025-10-15' and status ='completed' and (product_name ='C++' or product_name ='Java' or product_name ='Python') )b where b.num>=2)d left join client c on d.client_id = c.id order by d.id
这居然是中等难度吗??
感觉这才是最难的一道。。