select distinct ((select count(*) from a where a.year>2002) + (select count(*) from b where b.year>2002)+ (select count(*) from b where b.year>2002)) as 11 from a
(select 1 from a where a.year>2002) union (select 1 from b where b.year>2002) union (select 1 from b where b.year>2002)
tryselect sum(t) from ((select count(*) as t from a where a.year>2002) union (select count(*) as t from b where b.year>2002) union (select count(*) as t from b where b.year>2002))
因为这样好像默认是left join的说……