select 列1,count(aa) bb from
(select 列1,count(*) as aa from 表1 group by 列1
union all
select 列1,count(*) aa from 表2 group by 列1) a group by 列1
(select 列1,count(*) as aa from 表1 group by 列1
union all
select 列1,count(*) aa from 表2 group by 列1) a group by 列1
(select 列1,count(*) as aa from 表1 group by 列1
union all
select 列1,count(*) aa from 表2 group by 列1) a group by 列1
(select 列1,count(*) as aa from 表1 group by 列1
union all
select 列1,count(*) aa from 表2 group by 列1) a group by a.列1
(select 列1 from 表1
union all
select 列1 from 表2
) a
group by 列1