select aa_no,aa_name, sum(aa_qty),convert(int,aa_bit)
from tab1
group by aa_no,aa_name,convert(int,aa_bit)