Display the various jobs and total salary for each job SQLselect jobsumsal from

Display the various jobs and total salary for each

This preview shows page 3 - 5 out of 12 pages.

46) Display the various jobs and total salary for each jobSQL>select job,sum(sal) from emp group by job;47) Display the various jobs and total salary for each jobSQL>select job,min(sal) from emp group by job;48) Display the depart numbers with more than three employees in each dept. 51) Display the name of the empployee who earns highest salary. 52) Display the employee number and name for employee working as clerk and earning highest salary among clerks.SQL>select empno,ename from emp where where job='CLERK'and sal=(select max(sal) from emp where job='CLERK');53) Display the names of salesman who earns a salary more than the highest salary of any clerk.
Image of page 3
54) Display the names of clerks who earn a salary more than the lowest salary of any salesman. 55) Display the names of the employees who earn highest salary in their respective departments. 56) Display the names of the employees who earn highest salaries in their respective job groups. 57) Display the employee names who are working in accounting department. 58) Display the employee names who are working in Chicago.
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 12 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture