题解 | 查询下订单用户访问次数?

select user_id,
count(user_id) as visit_nums
from visit_tb as vt
where user_id in 
(
select distinct user_id
from order_tb as ot
where order_time like '%2022-09-02%'
)
and visit_time like '%2022-09-02%'
group by user_id
order by visit_nums desc

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务