Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

EMPLOYEE
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
OWNER
OwnerID OwnerName Email 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
PROPERTY
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
SERVICE
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

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

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions