I have salary table and attribute which employer get extra bonus (yes value). I want to calculate sum(salary) of employer without exta-bonus and sum of salary with bonus. Table with attribute is
id salary extra_bonus
--- ------- -----------
1 1200 yes
2 900
3 1300
4 800 yes
5 1100 yes
I want to get report like
sumsalary sumextrabonussalary percent
--------- ------------------- -------
3100 2100 67,7%