RESIDENT_ID FIRST_NAME SURNAME PROPERTY_ID 1 Albie Oʻ'Ryan 1 Tariq Khan 1 3 Ismail Salib 1 4 Callen Beck 5 Milosz Polansky 2 Ashanti Lucas 7 Randy Woodrue Aislinn Lawrence RESIDENTS table The OWNER table contains information on each property owner, such as their owner number (ID), last name, first name, and address. OWNER_NUM LAST_NAME FIRST_NAME ADDRESS CITY STATE ZIP_CODE AK102 Aksoy Ceyda 411 Griffin Rd. Seattle WA 98131 BI109 Bianchi Nicole 7990 Willow Dr. New York NY 10005 BU106 Burke Ernest 613 Old Pleasant St. Twin Falls ID 83303 CO103 Cole Meerab 9486 Circle Ave. Olympia WA 98506 J0110 Jones Ammarah 730 Military Ave. Seattle WA 98126 к0104 Kowalczyk Jakub 7431 S. Bishop St. Bellingham WA 98226 LO108 Lopez Janine 9856 Pumpkin Hill Ln. Everett WA 98213 MO100 Moore Elle-May 8006 W. Newport Ave. Reno NV 89508 OWNER table 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 OFFICE_NUM ADDRESS SQR_FT BDRMS FLOORS MONTHLY_RENT OWNER_NUM 1 1 30 West Thomas Rd. 1600 1 NULL BU106 2 1 782 Queen Ln. 2100 4 NULL AK102 1 9800 Sunbeam Ave. 1005 1 NULL BI109 105 North Illinois Rd. 1750 3 1 NULL КО104
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Task 6:
The StayWell marketing team wants to send mail to all residents. You need to return the first name and surname of all the residents combined as NAME, with their addresses named ADDRESS. However, the address should be retrieved from the PROPERTY table for residents.
Retrieve the mailing address (first name, surname, and address) for each resident.
Task 7:
The development team wants to add new residents and new service requests to StayWell without checking the latest IDs and manually incrementing it. Therefore, you need to alter the RESIDENTS table and change the RESIDENT_ID field to an auto-incremented field of type SMALLINT.
Alter the RESIDENTS table and change the ID field to an auto-incremented field.
Task 8:
The Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.
Add Yigit Yilmaz to the RESIDENTS table.
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:
PROPERTY_ID | OFFICE_NUM | ADDRESS | SQR_FT | BDRMS | FLOORS | OWNER_NUM |
---|---|---|---|---|---|---|
14 | 1 | 9 Houston Drive | 1,100 | 2 | 1 | MO100 |
15 | 1 | 11 Village Drive | 1,300 | 3 | 1 | CO103 |
However, the team does not want this data in the
Add the provided property locations to the PROPERTY table
Trending now
This is a popular solution!
Step by step
Solved in 2 steps