Question: Solve the following queries in SQL . For each query, you need to specify the SQL and show the result of each query if applied
Solve the following queries in SQL For each query, you need to specify the
SQL and show the result of each query if applied to the Company Database.
a Retrieve the names of employees in department or department who work more than
hours per week on the Computerization project or Reorganization project or Newbenefits
project.
b List the names of employees who have a dependent with the same first name as
themselves.
c Find the names of employees that are supervised directly by 'Jennifer S Wallace'.
d For each project, list the project name and the total hours per week by all
employees spent on that project.
e Retrieve the names of employees who work on every project.
f Retrieve the names of employees who do not work on any project.
g For each department, retrieve the department name, and the average salary of
employees working in that department.
h Retrieve the average salary of all male employees.
i Find the names and addresses of employees who work on at least one project located
in Sugarland but whose department has no location in Sugarland.
j List the last names of department managers who have no dependents.
k Retrieve the names of all employees who work in the department that has the employee with
the highest salary among all employees,
l Retrieve the names of all employees who supervisors supervisor has for ssn
m Retrieve the names of employees who make at least $ more than the employee who is
paid the least in the company.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
