Task 9: The StayWell property management team wants to add two additional properties and run some simulation tests relating to market coverage. Add the following properties to the

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need help with Task 9.

I have Task 9 written out on the bottom but it isn't working.

Expected Results

 

Task 9:

The StayWell property management team wants to add two additional properties and run some simulation tests relating to market coverage. Add the following properties to the PROPERTY table:

Here is my formula so far.

TASK 1

SELECT

O.FIRST_NAME, O.LAST_NAME, P.ADDRESS

FROM

PROPERTY P

JOIN

OWNER O ON P.OWNER_NUM = O.OWNER_NUM

 

TASK 2

SELECT

PROPERTY_ID, ADDRESS

FROM

PROPERTY

WHERE

EXISTS( SELECT

PROPERTY_ID

FROM

SERVICE_REQUEST

WHERE

PROPERTY.PROPERTY_ID = SERVICE_REQUEST.PROPERTY_ID

AND CATEGORY_NUMBER = 1)

 

TASK 3

SELECT

*

FROM

OWNER

WHERE

OWNER_NUM IN (SELECT

OWNER_NUM

FROM

PROPERTY

WHERE

SQR_FT > 2000)

 

TASK 4

SELECT

*

FROM

SERVICE_REQUEST ST1

WHERE EXISTS (

SELECT * FROM SERVICE_REQUEST ST2

WHERE ST1.NEXT_SERVICE_DATE != ST2.NEXT_SERVICE_DATE

AND ST1.PROPERTY_ID = ST2.PROPERTY_ID)

 

 

 

 

TASK 5

SELECT

CONCAT(FIRST_NAME, SURNAME) AS PARTICIPANT

FROM

RESIDENTS

UNION SELECT

CONCAT(FIRST_NAME, LAST_NAME) AS PARTICIPANT

FROM

OWNER

 

TASK 6

SELECT

CONCAT(R.FIRST_NAME, R.SURNAME) AS NAME, P.ADDRESS AS ADDRESS

FROM

RESIDENTS R

JOIN

PROPERTY P ON R.PROPERTY_ID = P.PROPERTY_ID

 

TASK 7

ALTER TABLE RESIDENTS

MODIFY COLUMN RESIDENT_ID SMALLINT AUTO_INCREMENT;

NEW QUERY

DESCRIBE RESIDENTS

 

TASK 8

INSERT INTO RESIDENTS(RESIDENT_ID, FIRST_NAME, SURNAME, PROPERTY_ID) VALUES(40, 'Yigit', 'Yilmaz',13);

NEW QUERY

SELECT * FROM RESIDENTS WHERE FIRST_NAME = 'Yigit' AND RESIDENT_ID = '40'

 

TASK 9

INSERT INTO PROPERTY (PROPERTY_ID, OFFICE_NUM, ADDRESS, SQR_FT, BDRMS, FLOORS, OWNER_NUM) VALUES

(14, 1, '9 Houston Drive', 1100, 2, 1, 'MO100'),

(15, 1, '11 Village Drive', 1300, 3, 1, 'CO103');

NEW QUERY

SELECT * FROM PROPERTY

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Search Engine
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education