- 参考答案
select user_id,
min(date) as first_buy_date,
count(user_id) as cnt
from order_info
where date > '2025-10-15'
and product_name in ('java','python','c++')
and status = 'completed'
group by user_id
having count(product_name)>=2
order by user_id
select user_id,
min(date) as first_buy_date,
count(user_id) as cnt
from order_info
where date > '2025-10-15'
and product_name in ('java','python','c++')
and status = 'completed'
group by user_id
having count(product_name)>=2
order by user_id