题解 | 查询下订单用户访问次数?
SELECT user_id, COUNT(info_id) AS visit_nums FROM visit_tb vt WHERE user_id IN(SELECT DISTINCT user_id FROM order_tb WHERE DATE(order_time) = '2022-09-02') AND DATE(visit_time) = '2022-09-02' GROUP BY vt.user_id ORDER BY visit_nums DESC;