Question: This is for SQL Database (Oracle): MPROPERTY (Property_ID, Owner_ID, Owner_Name, Owner_email, Owner_type) Property_ID is the id of property owned by an owner (assume one property
This is for SQL Database (Oracle):
MPROPERTY (Property_ID, Owner_ID, Owner_Name, Owner_email, Owner_type)
Property_ID is the id of property owned by an owner (assume one property can be owned by one owner only)
Owner_ID is the ID of Owner
Owner_name is name of the owner
Owner_email is the e-mail of the owner
Owner_type is type of owner (individual, corporate or Partnership)
MEMPLOYEE (Employee_ID, Last_name, First_Name, CellPhone, ExperienceLevel)
Where
EMPLOYEE_ID is the ID of employee
Last_name is last name of the employee
First_name is the first name of employee
CellPhone is cell number of employee
ExperienceLevel is based on number of years of experience and is classified as Master, Junior or Senior
MSERVICE (Property_ID, Employee_ID, Service_Date, Hours_worked)
Where
Service_date is the date that the property was serviced
--------------------------------------------------------------------------------
CREATE a Code for SQL queries -
- Give the employee name and cell numbers
- Give the total hours worked by an employee
- Give the last names of employees whose last names end with an n
- Give the total hours worked by each employee by property. Example employee1 may have a total of 30 hours on property 1
- Give the number (count) of property owned by each owner
- Give employee_id of employees not servicing any properties
- Give the last and first names of employees who are not servicing any properties
- Give the name of the owner who employs an employee whose last name is CORY
- Give the maximum, average, and minimum working hours of each employee
- Give the name of employees who work for more than 2 properties
- Give the structure of mowners
- Give total hours worked by employee Cory (last name)
- Danny, the manager, wants to see the impact of a 12% salary increase. Increase all workers salary by 12%
- Give the Ids of employees with the experience level of senior that are servicing properties
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
