For these exercises, we use the Employees Database presented at the end of Chapt
ID: 3702528 • 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.
4. Find the descriptions of all projects that require more than 70% of an employee’s time. Solve it two ways: 1) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN.
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 DatabaseExplanation / Answer
Note : I assumed that assignedtime of emplyee in database is in percentage format like 75% .
1. SELECT P.description from projects P,workson W WHERE P.projectid=W.projectid AND W.assignedtime >=70
2. SELECT `description` FROM `projects` INNER JOIN `workson` ON `projects`.`projectid` = `workson`.`projectid` AND `workson`.`assignedtime` >=70