以解决
select a.login_name,isnull(sum(b.pay_Moeny),0) as 出租总额 , isnull (count(b.pay_Moeny),0) as 出租的数量,
isnull((select sum(c.pay_Moeny) from tb_employee_Sale as c where c.emp_name=a.login_name
),0)
as 出售总额,
isnull((select count(c.pay_Moeny) from tb_employee_Sale as c where c.emp_name=a.login_name
),0)
as 出售数量
from tb_login as a join tb_employee as b on
b.emp_name=a.login_name
group by a.login_name
嘎嘎 继续 加班