两个子查询分别统计出来角色个数,客户个数,然后再与a表连接查询
select t1.user,t1.姓名,t2.角色个数,t3.客户个数
from a t1
left join
(
select user, count(*) 角色个数
from b group by user
)t2 on t1.user=t2.user
left join
(
select user, count(*) 客户个数
from c group by user
)t3
left join t1.user=t3.user