Question: Hello, I am working on SQL codes but I just can't figure out these remaining questions. Would anyone be able to help? 5.4) Write an
Hello, I am working on SQL codes but I just can't figure out these remaining questions. Would anyone be able to help?
5.4) Write an SQL statement to list the Name of employees who have worked on a property in New York .
5.5) Write an SQL statement to list the names of employees who have worked on a property owned by a Corporation .
5.6) Write an SQL statement to show the name and sum of HoursWorked for each employee.
5.7) Write an SQL statement to show the sum of HoursWorked for each ExperienceLevel of EMPLOYEE. Sort the results by ExperienceLevel in descending order.
5.8) Write an SQL statement to show the sum of HoursWorked for each Type of OWNER but exclude services of employees who have an ExperienceLevel of Junior and exclude any Type with less than three members.
| EmployeeID | LastName | FirstName | CellPhone | ExperienceLevel |
|---|---|---|---|---|
| 1 | Murray Dale R. Murray | Dale | 206-254-3456 | Senior |
| 2 | Murphy | Jerry | 585-545-8765 | Master |
| 3 | Fontaine | Joan | 206-254-4567 | Junior |
| 4 | Evanston | John | 206-254-2345 | Junior |
| 5 | Smith | Sam | 206-254-1234 | Master |
| OwnerID | OwnerName | Type | |
|---|---|---|---|
| 1 | Mary Jones | MJones@somewhere.com | Individual |
| 2 | DT Enterprises | DTE@dte.com | Corporation |
| 3 | Sam Douglas | SDouglas@somewhere.com | Individual |
| 4 | UNY Enterprises | UNYE@unye.com | Corporation |
| 5 | Doug Samuels | DSamuels@somewhere.com | Individual |
| PropertyID | PropertyName | Street | City | State | Zip | OwnerID |
|---|---|---|---|---|---|---|
| 1 | Eastlake Building | 123 Eastlake | Seattle | WA | 98119 | 2 |
| 2 | Elm St Apts | 4 East Elm | Lynwood | WA | 98223 | 1 |
| 3 | Jefferson Hill | 42 West 7th St | Bellevue | WA | 98007 | 2 |
| 4 | Lake View Apts | 1265 32nd Avenue | Redmond | WA | 98052 | 3 |
| 5 | Kodak Heights Apts | 65 32nd Avenue | Rochester | NY | 14604 | 4 |
| 6 | Private Residence | 1456 48th St | Bellevue | WA | 98007 | 1 |
| 7 | Private Residence | 1567 51st St | Bellevue | WA | 98007 | 3 |
| 8 | Private Residence | 567 151st St | Rochester | NY | 14604 | 5 |
| PropertyID | EmployeeID | ServiceDate | HoursWorked |
|---|---|---|---|
| 1 | 5 | 5/5/2008 | 4.5 |
| 2 | 4 | 5/8/2008 | 2.75 |
| 3 | 1 | 5/8/2008 | 4.5 |
| 4 | 5 | 5/19/2008 | 3 |
| 5 | 2 | 5/12/2008 | 7.5 |
| 6 | 3 | 5/10/2008 | 2.5 |
| 7 | 4 | 5/19/2008 | 2.5 |
| 8 | 2 | 5/15/2008 | 2.75 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
