# 需求分析 # SELECT order_date,t.user_id,order_nums,b.vip from ( SELECT DATE_FORMAT(a.order_time,'%Y-%m-%d') as order_date, a.user_id, COUNT(*) order_nums from order_tb a group by DATE_FORMAT(a.order_time,'%Y-%m-%d'),a.user_id having count(*)>=2 ) t ...