If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Consider an employee table which contains following columns
employee_id
employee name
salary
account_id
carrier_id
employer group_id
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;
Hi,
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,
Grofaty