Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

1. For each employee in the department with code ACCNT, find the employee ID and number of assigned hours that the employee is currently working

image text in transcribed

1. For each employee in the department with code ACCNT, find the employee ID and number of assigned hours that the employee is currently working on projects for other departments. Only report an employee if she has some current project to which she is assigned more than 50% of the time and the project is for another department. Report the results in ascending order by hours. 11. Find all departments where all of their employees are assigned to all of their projects.

2. Use correlated subqueries in the SELECT and WHERE clauses, derived tables, and subqueries in the HAVING clause to answer these queries. If they cannot be answered using that technique, explain why.

(a) Find the names of all people who work in the Information Technology department.

(b) Find the names of all people who work in the Information Technology department and who spend more than 20% of their time on the health project.

(c) Find the names of all people who make more than the average salary of the people in the Accounting department.

(d) Find the names of all projects that require more than 50% of an employees time.

(e) Find the total percentage time assigned to employee Bob Smith.

(f) Find all departments not assigned a project.

departments projects projectid code deptcode FKe name managerid FK subdeptof FK description startdate enddate revenue workson projectidFK employeeidFK assignedtime employees employeeid firstname lastname deptcode FK salary Figure 1.5: Schema for the Employees Database. departments projects projectid code deptcode FKe name managerid FK subdeptof FK description startdate enddate revenue workson projectidFK employeeidFK assignedtime employees employeeid firstname lastname deptcode FK salary Figure 1.5: Schema for the Employees Database

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_2

Step: 3

blur-text-image_3

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students explore these related Databases questions

Question

2. How will you handle the situation?

Answered: 3 weeks ago