Question: Project Objectives Retrieve data from multiple tables Join the table itself and run additional checks over the rows Use set operations to combine data from
Project Objectives
Retrieve data from multiple tables
Join the table itself and run additional checks over the rows
Use set operations to combine data from multiple tables
Change the structure of an existing table
Add new data to existing tables
Use transactions to make data updates and revert the updates
Best practices to follow:
Write detailed comments for SQL statements.
Organize and structure SQL statements for readability.
Your tasks are as follows:
Task : The StayWell Property Management team wants a list of all property addresses combined with the name of the owners. You will need to return three columns: the first name as FIRSTNAME, the last name as LASTNAME, and the property address as ADDRESS of the owners.
Task : StayWells maintenance team wants to recheck the apartments that had plumbing service requests beforehand. You will need to return all the property IDs and the addresses of the properties that had plumbing service request CATEGORYNUMBER
Task : The StayWell property management team wants to get in touch with those owners having properties larger than square feet. You need to return all the available information of the corresponding owners to the property management team.
Task : The StayWell maintenance team wants to minimize the number of planned visits to properties. The team wants to learn all the properties that have different planned service dates. You need to return all available data in the SERVICEREQUEST table, where requests are made for the same property with a different NEXTSERVICEDATE.
Be sure to only show one set per row for the corresponding service request.
Task : The marketing team wants to celebrate the success of StayWell with a party. The team wants a table with the names of all residents and owners combined into single column named PARTICIPANT. You need to combine this information from the tables and send it back to the team.
You do not need to create a new table in the database schema.
Task : 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.
Task : 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 RESIDENTID field to an autoincremented field of type SMALLINT.
Task : 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 You need to include this new resident in the RESIDENTS table.
Task :
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:
PROPERTYID OFFICENUM ADDRESS SQRFT BDRMS FLOORS OWNERNUM
Houston Drive MO
Village Drive CO
However, the team does not want this data in the database once they complete their operations.
Complete the following:
Create a transaction with the changes rolled back.
Task : Create a transaction with the changes rolled back.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
