Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the HOUSE table there is an Insurance attribute. This would be either a yes or no entry. In the HEATINGUNIT table there is a

In the HOUSE table there is an Insurance attribute. This would be either a yes or no entry. In the HEATINGUNIT table there is a DateOfBuilt attribute, you can format this as the year only, for example 2019, 1996, 2001, etc. Create a query that shows all the house addresses that have no insurance and the DateOfBuilt for those heating units. Order the list from oldest to newest.

CREATE TABLE HOUSE (HouseAddress CHAR(50), HouseOwner CHAR(30), Insurance CHAR(40));

INSERT INTO HOUSE VALUES ('285 Westport Rd', 'lem', 'Yes'), ('213 Longboard Ln', 'jude', 'Yes'), ('321 Surf Rd', 'jaden', '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, '213 Longboard Lne'), (3, 'Small', 'Electric', 'GE', NULL, 6000, '213 Longboard Ln'), (1, 'Small', 'Gas', 'LG', NULL, 2000, '285 Westport Rd'), (2, 'Large', 'Solar', 'GE', NULL, 3500, '285 Westport Rd'), (6, 'Medium', 'Hybrid', 'LG', NULL, 3000, '321 Surf Rd'), (5, 'Medium', 'Hybrid', 'LG', NULL, 2000, '321 Surf Rd');

CREATE TABLE TECHNICIAN (EmployeeNumber INT, EmployeeName CHAR(30), Title CHAR(40), YearHired INT); INSERT INTO TECHNICIAN VALUES (1, 'John', 'Tech1', 2004), (2, 'Jordan', 'Tech2', 2006), (3, 'JohnAllen', 'Supervisor', 2015);

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);

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

12.2 Explain how to organize supporting material.

Answered: 1 week ago

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

=+what kinds of policies and practices should be developed?

Answered: 1 week ago

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago