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

With the schemas given below, please provide SQL code to answer the following qu

ID: 3599158 • Letter: W

Question

With the schemas given below, please provide SQL code to answer the following question.

Q: List the name of the employee and his department name where the employee’s salary is below the average pay of his department that have more than five workers.

EMPLOYEES Name EMP ID FIRST NAME LAST NAME JOB MGR HIRE DATE SALARY COMM PCT DEPT ID Null? Typ NOT NULL NUMBER(4) VARCHAR2(10) VARCHAR2(10) VARCHAR2(9 NUMBER(4) DATE NOT NULL INUMBER NUMBER(7,2 NUMBER(2) DEPARTMENTS Name DEPT ID DEPT NAME DEPT LOC ID Null? Type 11? NUMBER(2) VARCHAR2(20) NUMBER

Explanation / Answer

SELECT EMPLOYEES.Name, DEPARTMENTS.Name
FROM EMPLOYEES
INNER JOIN DEPARTMENTS ON EMPLOYEES.DEPT_ID=DEPARTMENTS.DEPT_ID AND EMPLOYEES.COUNT(Name) > 5 AND EMPLOYEES.SALARY < AVG(EMPLOYEES.SALARY);

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