Professional Documents
Culture Documents
1. Write a query in SQL to list the employee name, job, and department name.
14 rows selected.
2. Write a query in SQL to list the employee name, job, and location who are either CLERK
or MANAGER.
7 rows selected.
3. Write a query in SQL to list the employee name, salary, and department name whose
salary is an odd value.
ENAME SAL DNAME
---------- ---------- --------------
JONES 2975 RESEARCH
4. Write a query in SQL to list the employee name, and department name who are not
working under a manager.
ENAME DNAME
---------- --------------
KING ACCOUNTING
5. Write a query in SQL to list the name of employees and their manager separated by the
string 'works for'.
E.ENAME||'WORKSFOR'||M.ENAME
-------------------------------
FORD works for JONES
SCOTT works for JONES
TURNER works for BLAKE
ALLEN works for BLAKE
WARD works for BLAKE
JAMES works for BLAKE
MARTIN works for BLAKE
MILLER works for CLARK
ADAMS works for SCOTT
BLAKE works for KING
JONES works for KING
E.ENAME||'WORKSFOR'||M.ENAME
-------------------------------
CLARK works for KING
SMITH works for FORD
13 rows selected.
6. Write a query in SQL to list the name, salary, manager name, manager's salary for those
employees whose salary is greater than the salary of their managers.
8. Write a query in SQL to list the employees name, job, salary and commission,for those
whose manager name is KING.
10. Write a query in SQL to list the employees (only name, hiredate, and manager's hiredate)
who are senior to their own manager.
6 rows selected.
11. List all the employees (only name, job, salary, and grade) whose salaries are in Grade 2
and Grade 3.