In the following exercises, you will use the data in the Solmaris Condominium Group database shown in

Question:

In the following exercises, you will use the data in the Solmaris Condominium Group database shown in Figures 1-21 through 1-25 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the Solmaris Condominium Group database so you will still have the original data when you complete Chapter 4.) In each step, use SQL to obtain the desired results. You can use the query feature in a DBMS to complete the exercises using a computer, or you can simply write the SQL command to complete each step. Check with your instructor if you are uncertain about which approach to take.
1. List the owner number, last name, and first name of every condo owner.
2. List the complete Location table (all rows and all columns).
3. List the last name and first name of every owner located in Lewiston.
4. List the last name and first name of every owner not located in Lewiston.
5. List the location number and unit number for every condo whose square footage is equal to or less than 1,084 square feet.
6. List the location number and unit number for every condo with three bedrooms.
7. List the unit number for every condo with three bedrooms that is located in location number 1.
8. List the location number and unit number for each condo whose condo fees are between $200 and $300 per month.
9. List the unit number for every condo in location 2 whose monthly condo fee is less than $200.
10. Labor is billed at the rate of $35 per hour. List the condo ID, category number, estimated hours, and estimated labor cost for every service request. To obtain the estimated labor cost, multiply the estimated hours by 35. Use the column name €œEstimatedCost€ for the estimated labor cost.
11. List the owner number and last name for all owners who live in Florida (FL), Georgia (GA), or South Carolina (SC).
12. List the location number, unit number, square footage, and condo fee for all units. Sort the results by condo fee within the square footage.
13. How many two-bedroom condos are located at each location?
14. Calculate the total condo fees Solmaris receives each month.
15. For every condo, list the location number, unit number, owner number, owner€™s first name, and owner€™s last name.
16. For every service request for painting, list the condo ID, description, and status.
17. For every service request for electrical systems, list the condo ID, location number, unit number, estimated hours, spent hours, owner number, and owner€™s last name.
18. Create a new table named LargeCondo using all columns in the CondoUnit table for condos with square footage greater than 1,500 square feet.
19. Use an update query to change the condo fee of any unit in the LargeCondo table whose fee is currently $300 to $550.
20. Use a delete query to delete all rows in the LargeCondo table in which the condo fee is $670.
21. There are two ways to create the query in Step 11. Write the SQL command that you used and then write the alternate command that also would obtain the correct result.
22. What WHERE clause would you use if you wanted to find all service requests where the description included the word €œpantry€ anywhere in the Description field? 


Figure 1-21

Address 100 Ocean Ave. 2 Solmaris Bayside 405 Bayside Blvd. Glander Bay State PostalCode LocationNum LocationName 1 Solm

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Concepts of Database Management

ISBN: 978-1285427102

8th edition

Authors: Philip J. Pratt, Mary Z. Last

Question Posted: