110,538
社区成员
发帖
与我相关
我的任务
分享
select sum(case when lrry = AA.a then 1 else 0 end) as [录入次数],sum(case when jyry = AA.a then 1 else 0 end) as [检验次数],AA.a as [人名] from Test1
right join
(
select lrry as a from Test1
union
select jyry as a from Test1
) AA on 1 = 1
group by AA.a
Test1为表名