Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the following table(s) as appropriate to answer the following questions. Dep

ID: 3596401 • Letter: U

Question

Use the following table(s) as appropriate to answer the following questions. Dept loc comm deptno integer integer integer deprno dname 4integer i text hiredate sal empno enane job integer text 10 ACCOUNTING NEW YORK 20 RESEARCH 30 SALES 40 OPERATIONS BOSTON text , inbeger text 7499 ALLEN SALESMAN 300 7698 BLAKEMANAGER 7654 MARTIN SALESMAN 7839 KING PRESIDENT 7844 TURNER SALESMAN 7902 FORD ANALYST 7521 WARD SALESMAN 7788 SCOTT ANALYST 7934 MILLER CLERK 7369 SMITH CLERK 900 JAMES CLERK 7566 JONES MANAGER 7876 ADAMS CLERK 7782 CLARK MANAGER 7698 1981-02-20 7839 1981.05-01 7698 1981-09-28 inu 1981-11-17 7698 1981-09-08 7566 1981-12-03 7698 1981-02-22 7566 1982-12-03 7782 1982-01-23 1300 7902 1980-12-17 7698 1981-12-03 7539 1981-04-02 7788 1983-01-12 7839 1981-06-09 1600 2850 Irul 250 1400 5000 Enui 1500 [nuill 3000 ul 1250 3000 ! [rulu 10 30 20 nu 950 null 2975 [nul] 1100 (nul 50 20 30 20 20 10 2450 nul alary for each job in the employees table. rite the SQL that would print the employee table with an additional column named new_job where the job title SALESMAN' is changed to 'SALESPERSON ri the SQL that would print the employee name and the department name in which the employee works.

Explanation / Answer

1. SELECT AVG(sal) AS average_salary , job FROM Emp GROUP BY job ; 2. SELECT empno , ename, job , mgr , hiredate, sal, comm , deptno , CASE
WHEN job = ‘SALESMAN’ THEN ‘SALESPERSON’
ELSE job END AS new_job from Emp;

3. SELECT E.ename , D.dname FROM Emp AS E JOIN Dept AS D ON E.deptno = D.deptno;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote