1.Display the manager number and the salary of the lowest paid employee for that manager.Exclude anyone whose manager is not known. Exclude any groups where the minimumsalary is $6,000 or less. Sort the output in descending order of salary.

2.Write a query to show the employee and the manager ids. The query should populate the manager id as the employee id itself if the employee doesn’t have a manager. In the result set, the Manager list should have the heading “Boss”.

1.Display the manager number and the salary of the lowest paid employee for that manager. Exclude anyone whose manager is not known. Exclude any groups where the minimum salary is $6,000 or less. Sort the output in descending order of salary.Answer:select mgr, min(sal) from emp where mgr is not null and sal>6000 order by sal desc;

2.Write a query to show the employee and the manager ids. The query should populate the manager id as the employee id itself if the employee doesn’t have a manager. In the result set, the Manager list should have the heading “Boss”. ANS: select Empid,nvl(mgr,empid)as boss from emp;

2.Write a query to show the employee and the manager ids. The query should populate the manager id as the employee id itself if the employee doesn’t have a manager. In the result set, the Manager list should have the heading “Boss”.

SELECT empID,CASE WHEN mgr IS NULL THEN empID ELSE mgrID END AS [Boss]FROM emp_A4200