题解 | 查询单日多次下订单的用户信息?
with temp as ( select user_id, date(order_time) as order_time, count(1) as order_nums from order_tb group by date(order_time) ,user_id having order_nums>=2) select order_time as order_date, a.user_id, order_nums, vip from temp a left join uservip_tb b on a.user_id=b.user_id order by order_nums desc