Home / Expert Answers / Computer Science / please-provide-the-correct-code-for-task-1-scenario-staywell-focuses-on-finding-and-managing-accomm-pa704

(Solved): Please provide the correct code for task 1. Scenario StayWell focuses on finding and managing accomm ...



Please provide the correct code for task 1.

Scenario

StayWell focuses on finding and managing accommodation for owners of student accommodation in the Seattle area. Currently, it operates in two main areas of the city with separate administrative offices: Colombia City and Georgetown. StayWell rents out 1 to 5-bedroom properties to students on behalf of property owner 7. You are assigned, as the database administrator, to collect and manage transactional data of the StayWell operations. You will begin by creating the database and tables for StayWell and will transfer the collected data. Then, you will need to execute further database operations as StayWell’s operations expand.

The OFFICE table contains information about the two StayWell office locations, including the office number, office name, and address.

OFFICE_NUM
1
2
OFFICE_NAME
StayWell-Colombia City
StayWell-Georgetown
ADDRESS
1135 N. Wells Avenue
986 S. Madison Rd
AREA
Col

The SERVICE_CATEGORY table contains information regarding the different service categories, such as their numerical designation and description.

CATEGORY_NUM
1
2
3
4
5
6
CATEGORY_DESCRIPTION
Plumbing
Heating
Painting
Electrical Systems
Carpentry
Furniture replacement

The SERVICE_REQUEST table contains information on service requests for each property. The SERVICE_REQUEST table stores the service ID, property ID, service category number, the managing office ID, request description, the request's status, estimated hours, hours spent, and the service date.

SERVICE ID PROPERTY_ID CATEGORY_NUMBER OFFICE_ID DESCRIPTION
1
2
3
5
6
11
1
6
8
4
2
4
5
4
3
1
2
2
1
The second bedroom upstai

The RESIDENTS table contains the information on each resident, such as their resident ID, first name, surname (last name), and property ID.

RESIDENT_ID
1
2
3
4
5
6
7
8
FIRST_NAME
Albie
Tariq
Ismail
Callen
Milosz
Ashanti
Randy
Aislinn
SURNAME
ORyan
Khan
Salib
Beck

The OWNER table contains information on each property owner, such as their owner number (ID), last name, first name, and address.

OWNER_NUM
AK102
BI109
BU106
CO103
JO110
KO104
LO108
MO100
LAST_NAME
Aksoy
Bianchi
Burke
Cole
Jones
Kowalczyk
Lopez
Moore
FIRS

The PROPERTY table contains information on each property, including the property ID, managing office number, address, square feet, bedrooms, floors, monthly rent, and the owner.

PROPERTY_ID
1
2
3
4
5
6
7
8
OFFICE_NUM
1
1
1
1
1
1
2
2
ADDRESS
30 West Thomas Rd.
782 Queen Ln.
9800 Sunbeam Ave.
105 North I

Task 1:

The property management team of StayWell is considering separating the database operations of its Colombia City and Georgetown offices. Therefore, you need to create a COLOMBIA_CITY_PROPERTY VIEW to filter the properties where OFFICE_NUM equals to 1. Be sure to show all the PROPERTY table information on each property except for the managing office number (OFFICE_NUM).

Create a COLOMBIA_CITY_PROPERTY VIEW to filter the properties managed by the Columbia City office where OFFICE_NUM equals to 1.

My Input: 

CREATE VIEW 'COLOMBIA_CITY_PROPERTY_VIEW' AS SELECT * FROM PROPERTY WHERE OFFICE_NUM = 1;

Cengage Results:

Module Lab Assessment 3
Y3
Labl
</>
CENGAGE | MINDTAP
50
Instructions 2 of 5
Expected Results
Tables_in_StayWell
COLOMBIA CIT

 

 

OFFICE_NUM 1 2 OFFICE_NAME StayWell-Colombia City StayWell-Georgetown ADDRESS 1135 N. Wells Avenue 986 S. Madison Rd AREA Colombia City Georgetown CITY Seattle Seattle STATE WA WA ZIP_CODE 98118 98108 CATEGORY_NUM 1 2 3 4 5 6 CATEGORY_DESCRIPTION Plumbing Heating Painting Electrical Systems Carpentry Furniture replacement SERVICE ID PROPERTY_ID CATEGORY_NUMBER OFFICE_ID DESCRIPTION 1 2 3 5 6 11 1 6 8 4 2 4 5 4 3 1 2 2 1 The second bedroom upstairs is not heating up at night. STATUS A new strip light is needed for the kitchen. Scheduled The bathroom door does not close properly. New paint job requested for the common area (lounge). Problem has been confirmed. central heating engineer has been scheduled. Shower is dripping when not in use. New outlet has been requested for the first upstairs bedroom. (There is currently Scheduled no outlet). Service rep has confirmed issue. Scheduled to be refitted. Open Problem confirmed. Plumber has been scheduled. EST HOURS SPENT HOURS NEXT_SERVICE_DATE 2 3 1 10 4 1 0 1 0 2 2019-11-01 2019-10-02 2019-11-09 2019-10-02 NULL 2019-10-07 RESIDENT_ID 1 2 3 4 5 6 7 8 FIRST_NAME Albie Tariq Ismail Callen Milosz Ashanti Randy Aislinn SURNAME O'Ryan Khan Salib Beck Polansky Lucas Woodrue Lawrence PROPERTY_ID 1 1 1 2 2 2 2 3 OWNER_NUM AK102 BI109 BU106 CO103 JO110 KO104 LO108 MO100 LAST_NAME Aksoy Bianchi Burke Cole Jones Kowalczyk Lopez Moore FIRST_NAME Ceyda Nicole Ernest Meerab Ammarah Jakub Janine Elle-May ADDRESS 411 Griffin Rd. 7990 Willow Dr. 613 Old Pleasant St. 9486 Circle Ave. 730 Military Ave. 7431 S. Bishop St. 9856 Pumpkin Hill Ln. 8006 W. Newport Ave. CITY Seattle New York Twin Falls Olympia Seattle Bellingham Everett Reno STATE WA NY ID WA WA WA WA NV ZIP CODE 98131 10005 83303 98506 98126 98226 98213 89508 PROPERTY_ID 1 2 3 4 5 6 7 8 OFFICE_NUM 1 1 1 1 1 1 2 2 ADDRESS 30 West Thomas Rd. 782 Queen Ln. 9800 Sunbeam Ave. 105 North Illinois Rd. 887 Vine Rd. 8 Laurel Dr. 447 Goldfield St. 594 Leatherwood Dr. SQR_FT BDRMS 1600 2100 1005 1750 1125 2125 1675 2700 3 4 2 2 3 LO 5 FLOORS 1 2 1 1 1 2 2 2 MONTHLY RENT NULL NULL NULL NULL NULL NULL NULL NULL OWNER_NUM BU106 AK102 BI109 KO104 SI105 MO100 CO103 KO104 Module Lab Assessment 3 Y3 Labl CENGAGE | MINDTAP 50 Instructions 2 of 5 Expected Results Tables_in_StayWell COLOMBIA CITY PROPERTY PROPERTY ID 1 2 3 4 Actual Results > Tables_in_StayWell COLOMBIA CITY PROPERTY OFFICE NUM 1 < Table_type VIEW ADDRESS 30 West Thomas Rd. 782 Queen Ln. 9800 Sunbeam Ave. 105 North Illinois Rd. 007 --- Table_type VIEW SQR FT BDR 1600 3 2/5 2100 4 1005 2 1750 3 OFFICE_NAME ADDRESS StayWell- Colombia City 1135 N. Wells Avenue query.sql + 1 -- Write your query below and then click "Run Query" to execute it. To save multiple queries, click the "+" icon above. 2 CREATE VIEW 'COLOMBIA_CITY_PROPERTY_VIEW' AS 3 SELECT * FROM PROPERTY WHERE OFFICE_NUM = 1; 4 5 SQL Viewer X StayWell D ? >_ Terminal Q Search this course + X ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "COLOMBIA_CITY_PROPERTY_VIEW' AS SELECT * FROM PROPERTY WHERE OFFICE_NUM= 1' at line 1 ?


We have an Answer from Expert

View Expert Answer

Expert Answer


ANSWER: --Filter data for offices managed by Columbia city CREATE VIEW COLOMBIA_CITY_PROPERT
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe