17,377
社区成员
发帖
与我相关
我的任务
分享
select no, year, sum(count_a) tacount, sum(count_b) tbcount
from (
select no, year, count count_a, 0 count_b
from ta
union all
select no, year, 0 count_a, count count_b
from tb )
group by no, year
order by year, no;