select sum(commission) as 'First' from table1 where name='a' union select sum(commission) as 'Second' from table1 where name='b'
select [First] = (select sum(commission) from table1 where name='a'), [Second] = (select sum(commission) from table1 where name='b')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)