Hi. Can someone please help me with this SQL question? I asked
this before, but someone just cut and pasted a completely incorrect
answer that they found online.
Please be genuine in your response.
Write an SQL statement to show the sum of HoursWorked for
each type of OWNER but exclude services of employees who have
ExperienceLevel of Junior.
OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType )
PROPERTY_TYPE ( PropertyID, PropertyName, PropertyType, Street,
City, State, Zip,OwnerID )
PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID,
ServiceDate, EmployeeID, HoursWorked)
EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone,
ExperienceLevel )
GG_SERVICE ( ServiceID, ServiceDescription, CostPerHour )
This is what I've written so far, but apparently it's only
50% correct, as the rows don't match.
SELECT OwnerType, SUM(HoursWorked) AS TotalHoursWorked
FROM EMPLOYEE E, PROPERTY_SERVICE P, OWNER O
WHERE E.EmployeeID = P.EmployeeID
AND E.ExperienceLevel <> 'Junior'
I don't know what to do to make it work. I've tried 10 different
things over the past hour and a half, but it's still wrong. What I
posted is the closest I've gotten to getting it correct. There is a
hint that I need to use Natural Join, but I can't figure it
out.
Can someone please help?
Please find the SQL Query below.
QUERY
SELECT o.OwnerType, sum(ps.HoursWorked) FROM OWNER o JOIN PROPERTY_TYPE pt ON o.OwnerID = pt.OwnerID JOIN PROPERTY_SERVICE ps ON pt.PropertyID = ps.PropertyID JOIN EMPLOYEE e ON ps.EmployeeID = e.EmployeeID WHERE e.ExperienceLevel != 'Junior' GROUP BY o.OwnerType;
Hi. Can someone please help me with this SQL question? I asked this before, but someone...
Please write in Mysql OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY ( PropertyID, PropertyName, Street, City, State, Zip, OwnerID ) EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel ) SERVICE ( PropertyID, EmployeeID, ServiceDate, HoursWorked ) Write an SQL statement to list LastName and FirstName of employees who have worked on a property in Bellevue. Use a subquery. The result should look like the following: LastName FirstName Murray Dale Fontaine Joan Evanston John
Assume that Garden Glory designs a database with the following tables: OWNER (OwnerID, OwnerName, OwnerEmailAddress, OwnerType) OWNED_PROPERTY (PropertyID, PropertyName, PropertyType, Street, City, State, Zip, OwnerID) GG_SERVICE (ServiceID, ServiceDescription, CostPerHour); EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel) PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID, ServiceDate, EmployeeID, HoursWorked) The referential integrity constraints are: OwnerID in OWNED_PROPERTY must exist in OwnerID in OWNER PropertyID in PROPERTY_SERVICE must exist in PropertyID in OWNED_ PROPERTY ServiceID in PROPERTY_SERVICE must exist in ServiceID in GG_SERVICE EmployeeID in PROPERTY_SERVICE must exist...
Garden Glory Project Questions The following Garden Glory database design is used in Chapter 3: OWNER (OwnerID, OwnerName, OwnerEmail, OwnerType) PROPERTY (PropertyID, PropertyName, Street, City, State, Zip, OwnerID) EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel) SERVICE (PropertyID, EmployeeID, SeviceDate, HoursWorked) The referential integrity constraints are: OwnerID in PROPERTY must exist in OwnerID in OWNER PropertyID in SERVICE must exist in PropertyID in PROPERTY EmployeeID in SERVICE must exist in EmployeeID in EMPLOYEE Garden Glory has modified the EMPLOYEE table by adding...
need help with part b
GARDEN GLORY PROJECT QUESTIONS Garden Glory wants to expand its database applications beyond the recording of property services. The company still wants to maintain data on owners, properties, employees, and services, but it wants to include other data as well. Specifically, Garden Glory wants to track equipment, how it is used during services, and equipment repairs. In addition, employees need to be trained before they use certain equipment, and management wants to be able to...
SQL: Can someone please help me ASAP?? I need to create QUERIES for 2 INNER JOINS with 3 or more tables. I have an HR Database with the tables Region, Location, Country, Job, Department, Employee, Dependent. Any help would be greatly appreciated...
Python debug. (Registration error)
Hi, can you help me debug the error code, and how can I fix it?
Thank you very much!
4 import sqlite: 5 conn sqlite3.connect("OS_Employee.db") 7 withconn: 8 curconn.cursor() try: 10 # Take user input for Employee-ID. Error checks it. Makes sure it's not taken. EmployeeID = input ("Please enter a employee ID: ") First_Nameinput("Please enter the employee's first name: ") Last Nameinput("Please enter the employee's last name: ") Email-input ("Please enter the employee's email: ")...
This is a cell molecular biology question from my class. Can someone please help me with this question? Please no diagrams or pictures from online copied and pasted here. I need a detailed explanation. Thank You! Please draw the five levels of M phase in a diploid cell (2n) where n=2.
Can someone please help me. I am having trouble writing the following SQL query: "Retrieve the name and country of the player with the most yellow cards in the 2014 world cup." The player and country are in the player table, and the yellow cards are in the player_cards table. The tables can be connected on player_id. The problem I am having is that there are 3 players that have 3 yellow cards, not just a single player. (3 yellow...
I am floored. For the love of sweet Jesus someone please help me. The question is to try and find the largest possible area of a right triangle that has a 28 cm long hypotenuse. Units are square centimeters. I've tried a really hard to figure it out but I keep getting it wrong. Please help!
ASP HI CAN SOMEONE HELP ME WITH THIS 2 QUESHTION'S PLEASE ITS URGENTLY I DONT UNDER STAND THEM.!!!!!!! MY SCHOOL WAS CLOSED AND I HAVEN'T BEEN ABLE TO GET HELP 1. The amount of kinetic energy an object possesses depends on: A. the type of substance it is composed of. B. how fast it is moving. C. it's density. D. it's volume. E. All of the above. 2. Ozone is substance which consists of three atoms of oxygen bonded together,...