记录:初始想法:比较复杂,想到的是把第二小的日期做链接 SELECT o1.user_id, MIN(o1.date) AS 'first_buy_date', o2.date AS 'second_buy_date', COUNT(id) AS 'cnt' FROM order_info o1 LEFT JOIN (SELECT user_id, date, ROW_NUMBER() O...