Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For these exercises, we use the Employees Database presented at the end of Chapt

ID: 3702530 • Letter: F

Question

For these exercises, we use the Employees Database presented at the end of Chapter 1. Answer each question with a single SQL statement. Your query must work for any set of data in the Employees Database, not just the set of data we provide.

6. Find the description of all projects with no employees assigned to them.

24 Chapter I:Databasks projects projectd deparmenls code managerid subdeplof description startdate encdate revenue workson empore edi assignedime employeeld firstname lastname deplcode salary Figure 1.5: Schema for the Imployees Database

Explanation / Answer

Answer:

Select p.projectid,p.description
from projects p
join workson w on w.projectid = p.projectid
where w.employeeid = "NULL"
order by p.projectid
/*This query will list down all the projectid and description where no employee is assigned to*/

Sample output:

projectid description 123 Apple 124 Samsung 125 Sony