SELECT SUM(hits01 + hits02 + hits03 + hits04 + hits05 + hits06 + hits07 + hits08 + hits09) AS 'AEROwiz' FROM tbl_2011 WHERE appName='AEROwiz' SELECT SUM(hits10 + hits11 + hits12) AS 'AEROwiz' FROM tbl_2010 WHERE appName='AEROwiz'
hits10,hits11和hits12存在于两个表中.
SELECT SUM(...) AS AEROWiz FROM ... UNION SELECT SUM(...) AS AEROWiz FROM ...
更新
在另一个查询中包装union:
SELECT SUM(AEROWiz) FROM ( .... unioned queries here ) AS child