By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,333 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,333 IT Pros & Developers. It's quick & easy.

count on aggregate function

P: 6
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.
Sep 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: 14
select account_id,carrier_id,employer_group_id,count(empl oyee_id) from employee
group by account_id,carrier_id,employer_group_id
Sep 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.