这是个不开窗的解题思路,因此过程比较比较繁琐。 第一步:找出first_buy_date的信息以及临时表 first_buy (SELECT t1.user_id, MIN(t1.date) as first_buy_date, COUNT(t1.user_id) as cnt FROM (SELECT o.* FROM order_info o JOIN (SELECT user_id FROM order_info WHERE date > '2025-10-15' AND product_name in ('C++', 'Java', 'Python') AND status = ...