select inputtime,count(1),(select count(1) from b where inputtime=a.inputtime) from a group by inputtime
union
select inputtime,count(1),(select count(1) from a where inputtime=b.inputtime) from b group by inputtime
union
select inputtime,count(1),(select count(1) from a where inputtime=b.inputtime) from b group by inputtime
(
select inputtime,count(*) as A表中相应时间的记录数 ,'' as B表中相应时间的记录数 from a group by inputtime
union
select inputtime,'' as A表中相应时间的记录数,count(*) as B表中相应时间的记录数 from b group by inputtime
)