题解 | 查询单日多次下订单的用户信息?
查询单日多次下订单的用户信息?
https://www.nowcoder.com/practice/9958aed1e74a49b795dfe2cb9d54ee12
select date_format(order_time,'%Y-%m-%d') order_date ,t1.user_id ,count(t1.user_id) order_nums ,t2.vip vip from order_tb t1 join uservip_tb t2 on t1.user_id = t2.user_id where order_price > 0 group by 1,2,4 having count(t1.user_id) >1 order by 3 desc