看了“韭菜&文盲”练习

先取满足科目,下单完成,日期限制;id分组,最小的日期,第二个日期,次数呢?

[重点是第二个日期]substr(group_concat(distinct date order by date separator ","),12,10),

select user_id,min(date),
substr(group_concat(distinct date order by date separator ","),12,10),
count(date) cnt
from order_info
where status="completed"
and product_name in ("C++","Java","Python")
and date>"2025-10-15"
group by user_id
having count(date)>1
order by user_id