Consider an employee table which contains following columns
I need to find the sum of salaries grouped by account_id,carrier_id,employer_group_id.Hope it gets grouped as records having distinct combinations of above mentioned columns(correct me if i'm wrong). I need to find the count of these combinations-DB2 query for the same(executable in ibm iseries navigator).
I tried the following query select count(sum(salary)) from <table name> group by account_id,carrier_id,employer_group_id.
but in vain;
you can get this info using temporally table, like this: select count(*) from (select sum(salary) from <table name> group by account_id,carrier_id,employer_group_id) as temp
Hope this helps,