- Staywell Student Accommodation Use Sql And The Staywell Student Accommodation Database See Figures 1 4 Through 1 9 In M 1 (78.54 KiB) Viewed 55 times
StayWell Student Accommodation Use SQL and the StayWell Student Accommodation database (see Figures 1-4 through 1-9 in M
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
StayWell Student Accommodation Use SQL and the StayWell Student Accommodation database (see Figures 1-4 through 1-9 in M
StayWell Student Accommodation Use SQL and the StayWell Student Accommodation database (see Figures 1-4 through 1-9 in Module 1) to complete the following exercises. If directed to do so by your instructor, use the information provided with the Module 3 Exercises to print your output or save it to a document. For every property, list the management office number, address, monthly rent, owner num- ber, owner's first name, and owner's last name. 1. 2. 3. For every completed or open service request, list the property ID, description, and status. For every service request for furniture replacement, list the property ID, management office number, address, estimated hours, spent hours, owner number, and owner's last name. List the first and last names of all owners who own a two-bedroom property. Use the IN operator in your query. 4. Repeat Exercise 4, but this time use the EXISTS operator in your query. 5. 6. List the property IDs of any pair of properties that have the same number of bedrooms. For example, one pair would be property ID 2 and property ID 6, because they both have four bedrooms. The first property ID listed should be the major sort key and the second prop- erty ID should be the minor sort key. 7. List the square footage, owner number, owner last name, and owner first name for each property managed by the Columbia City office. Repeat Exercise 7, but this time include only those properties with three bedrooms. List the office number, address, and monthly rent for properties whose owners live in Washington state or own two-bedroom properties. 8. 9. 10. List the office number, address, and monthly rent for properties whose owners live in Washington state and own a two-bedroom property. 11. List the office number, address, and monthly rent for properties whose owners live in Washington state but do not own two-bedroom properties. 12. Find the service ID and property ID for each service request whose estimated hours are greater than the number of estimated hours of at least one service request on which the category number is 5. 13. Find the service ID and property ID for each service request whose estimated hours are greater than the number of estimated hours on every service request on which the cat- egory number is 5. 14. List the address, square footage, owner number, service ID, number of estimated hours, and number of spent hours for each service request on which the category number is 4. Repeat Exercise 14, but this time be sure each property is included regardless of whether the property currently has any service requests for category 4. 15. 16. Repeat Exercise 15 using a different SQL command to obtain the same result. What is the difference between the two commands?