select sum(cast (a as int)) from table