Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If anyone can help me out with this that would be helpful. ive tried for hours trying to set it up but it never seems

If anyone can help me out with this that would be helpful. ive tried for hours trying to set it up but it never seems to work. here is the link for the company database data.http://www.cc.chu.edu.tw/~changc/course/share/mysql-practice.html

Submit query statements and query execution results with screen shoots for each question. You can use any database you prefer.

Setup the database and input the data. You must implement the referential constraints if necessary. Complete the following queries: 1. Retrieve the birthdate address of the employee whose name is 'John B. Smith'. 2. Retrieve the name and address of all employees who work for the 'Research' department. 3. For every project located in 'Stafford', list the project number, the controlling department number, and the department manager's last name, address, and birthdate. 4. For each employee, retrieve the employee's first and last name and the first and last name of the his or her immediate supervisor. 5. Select all of combinations of EMPLOYEE SSN and DEPARTMENT DNAME in the database. 6. Retrieve the salary of every employee. 7. Make a 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 the department that controls the project. 8. Retrieve the name of each employee who has a dependent with the same first name and same sex as the employee. 9. Retrieve the name of employees who have no dependents. 10. List the name of managers who have at least one dependent. 11. Retrieve the names of all employees who do not have supervisors. 12. Find the sum of the salaries of all employees of the 'Research' department, as well as the maximum salary, the minimum salary, and the average salary in this department. 13. Count the number of distinct salary values in the database. 14. Retrieve the names of all employees who have two or more dependents. 15. For each department, retrieve the department number, the number of employees in the department, and their average salary.

16. For each project, retrieve the project number, the project name, the number of employees who work on that project.

17. For each project on which more than two employees work, retrieve the project number, the project name, and the number of employees who work on that project.

18. For each project, retrieve the project number, the project name, and the number of employees from department 5 who work on the project.

19. Retrieve all employees whose address is in Houston, Texas.

20. Find all employees who were born during the 1950s.

Submit query statements and query execution results with screen shoots for each question.

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions

Question

Ict stands for

Answered: 1 week ago