发布网友 发布时间:2022-04-27 01:31
共1个回答
热心网友 时间:2022-04-10 05:05
SELECT m.user_id, b_total, c_total, d_total FROM a m, (SELECT user_id, COUNT(*) b_total FROM b GROUP BY user_id) n,
(SELECT user_id, COUNT(*) c_total FROM c GROUP BY user_id) j, (SELECT user_id, COUNT(*) d_total FROM d GROUP BY user_id) k,
WHERE m.user_id = n.user_id AND m.user_id = j.user_id AND m.user_id = k.user_id;