Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 6 or department 7 who work more than 5
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 888665555 for ssn.
(m) Retrieve the names of employees who make at least $5,000 more than the employee who is
paid the least in the company.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago

Question

demonstrate the importance of induction training.

Answered: 1 week ago