Interview Answer

It's not at all important to get it right the first time. It's vitally important to get it right the last time. Andrew Hunt and David Thomas

List the highest salary paid for each job.

January 1, 1970 12:00 am

Comments



List the highest salary paid for each job.



												desc HR.employees;
												
												Name           Null     Type         
												-------------- -------- ------------ 
												EMPLOYEE_ID    NOT NULL NUMBER(6)    
												FIRST_NAME              VARCHAR2(20) 
												LAST_NAME      NOT NULL VARCHAR2(25) 
												EMAIL          NOT NULL VARCHAR2(25) 
												PHONE_NUMBER            VARCHAR2(20) 
												HIRE_DATE      NOT NULL DATE         
												JOB_ID         NOT NULL VARCHAR2(10) 
												SALARY                  NUMBER(8,2)  
												COMMISSION_PCT          NUMBER(2,2)  
												MANAGER_ID              NUMBER(6)    
												DEPARTMENT_ID           NUMBER(4)   
												

The Max funcation returns maximum value and group by funcation group the result set.


Solution

   					 
												SELECT JOB, MAX(SAL) FROM EMPLOYEE GROUP BY JOB;
																    

Comments

Posted by selvamselvam
December 6, 2015 2:48 am

We would like to know more about Armstrong Number

Posted by
December 6, 2015 2:52 am

Can you give alternative approch?

Posted by selvamselvam
December 6, 2015 4:48 am

test1

Posted by selvamselvam
December 6, 2015 4:50 am

hello

Posted by panuganti.venkiii
July 3, 2016 11:43 pm

thanks for sharing testing interview questions



Please login to add comments.