Question: Using the following database with SQL find the answers 1) List the names of technicians who maintained a heating unit in 285 Westport Rd. along

Using the following database with SQL find the answers

1) List the names of technicians who maintained a heating unit in 285 Westport Rd. along with the service type performed.

2) Find the name and number of the largest gas heating unit

3) What percent is the total capacity of gas heating units out of the total capacity of all types of heating units?

CREATE TABLE HOUSE (HouseAddress CHAR(50), HouseOwner CHAR(30), Insurance CHAR(40)); INSERT INTO HOUSE VALUES ('285 Westport Rd', 'John', 'Yes'), ('897 Nowhere', 'Jim', 'Yes'), ('891 Hello', 'Bill', 'No'); CREATE TABLE HEATINGUNIT (HeatingUnitID INT, UnitName CHAR(30), UnitType CHAR(40), Manufactory CHAR(40), DateOfBuilt Date, Capacity INT, HouseAddress CHAR(50)); INSERT INTO HEATINGUNIT VALUES (4, 'Large', 'Solar', 'GE', NULL, 3000, '897 Nowhere'), (3, 'Small', 'Electric', 'GE', NULL, 5000, '897 Nowhere'), (1, 'Small', 'Gas', 'LG', NULL, 2000, '285 Westport Rd'), (2, 'Large', 'Gas', 'GE', NULL, 4500, '285 Westport Rd'), (6, 'Medium', 'Hybrid', 'LG', NULL, 4000, '891 Hello'), (5, 'Large', 'Hybrid', 'LG', NULL, 2500, '891 Hello'); CREATE TABLE TECHNICIAN (EmployeeNumber INT, EmployeeName CHAR(30), Title CHAR(40), YearHired INT); INSERT INTO TECHNICIAN VALUES (1, 'Vic', 'Tech1', 2005), (2, 'Tom', 'Tech2', 2010), (3, 'Greg', 'Manager', 2012); CREATE TABLE SERVICE (HeatingUnitID INT, ServiceType CHAR(40), Date Date, Time TimeSTAMP, EmployeeNumber INT); INSERT INTO SERVICE VALUES (1, 'Repair', NULL, NULL, 1), (2, 'Repair', NULL, NULL, 2), (3, 'Maintenance', NULL, NULL, 2), (4, 'Maintenance', NULL, NULL, 2); 

The answers should include the following information

1)The query in text format

2)A screen shot or snippet of the database query, within the database simulator

3)The output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!