DB2 - Display the highest, lowest, sum, and average salary of all employees. Label the columns maximum, minimum, sum, and average, respectively, for each DEPARTMENT_ID

 Posted by Bandi on 11/30/2013 | Category: Others Interview questions | Views: 6498 | Points: 40
Answer:

SELECT DEPARTMENT_ID, MAX(SALARY) MAXIMUM, MIN(SALARY) MINIMUM, SUM(SALARY) SUM, AVG(SALARY) AVARAGE
FROM EMPLOYEES
Group BY DEPARTMENT_ID


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response