Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EMPLOYEE Fname Minit Lname Ssn BdateAddress S Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT LOCATIONS Dnumber Dlocation PROJECT Pname Pnumber Plocation

image text in transcribedimage text in transcribed

EMPLOYEE Fname Minit Lname Ssn BdateAddress S Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT LOCATIONS Dnumber Dlocation PROJECT Pname Pnumber Plocation Dnum WORKS_ON Essn Pno Hours DEPENDENT Essn Dependent name Sex Bdate Relationship Provide MySQL queries for the following: 1. 2. 3. Retrieve the birthdate and address of the employee(s) whose name is John B. Smith Retrieve the name and address of all employees who work for the Research department. For every project located in Stafford, list the project number, the controlling department, and the manager's last name, address and birthdate Retrieve the names of each employee who works in all projects controlled by department 5 Find the list of all project numbers for projects that involve an employee whose last name is Smith, either as a worker or as a manager of that department that controls the project. Retrieve the names of all employees who have two or more dependents. Retrieve the names of all employees who have no dependents. For each employee, find the employee's first and last name and the first and last name of their immediate supervisor 4. 5. 6. 7. 8. 9. Retrieve all employees in department 5 whose salary is between $30,000 and $40,000. 10. Retrieve the list of employees and the projects they are working on, ordered by department and, within each department, ordered alphabetically by last name, first name 11. Retrieve the social security numbers of all employees who work on projects numbers 1,2, or 3 12. Retrieve the names of all employees who do not have a supervisor 13. Find the payroll (i.e., sum of all the salaries of all employees), maximum salary, minimum salary and average salary in the Research department. 14. Find the total number of employees in the Research department. 15. How many different salaries are paid by the Company? 16. For each project, retrieve the project number, the project name, and the number of employees from department 5 who work on the project. name, and the number of employees who work on the project. number of employees who are making more than $40,000. 17. For each project on which more than two employees work, retrieve the project number, project 18. For each department that has more than 5 employees, retrieve the department number and the

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

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions