题解 | 查询单日多次下订单的用户信息?
select date(order_time) order_date,o.user_id,count(o.user_id) order_nums,u.vip from order_tb o left join uservip_tb u on o.user_id=u.user_id group by order_date,o.user_id having count(o.user_id)>1
select date(order_time) order_date,o.user_id,count(o.user_id) order_nums,u.vip from order_tb o left join uservip_tb u on o.user_id=u.user_id group by order_date,o.user_id having count(o.user_id)>1
相关推荐