Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 1 : List the owner number, the owner's first name as FIRST and the owner's last name as LAST for all owners. The first
Task : List the owner number, the owner's first name as FIRST and the owner's last name as LAST for all owners. The first name should appear in uppercase letters and the last name should appear in lowercase letters.
Task : List the owner number and last name for all owners located in the city of Seattle. Your query should ignore case. For example, a customer with the city Seattle should be included, as should customers whose city is SEATTLE, SEAttle, SeAttle, and so on
Task : StayWell is offering a monthly discount for residents who pay their rent on a quarterly basis. The discount is percent of the monthly fee. For each property, list the office number, address, owner number, owners last name, monthly rent, and discount as DISCOUNT. The discount should be rounded to the nearest dollar.
Task : Create the DISPLAYOWNER procedure which obtains the first name and last name of the owner whose number currently is stored in IOWNERNUM provided as a parameter Place these values in the variables IFIRSTNAME and ILASTNAME. Output the contents of IOWNERNUM, IFIRSTNAME, and ILASTNAME.
Task : Create the DISPLAYPROPERTYOWNER procedure which obtains the office location number, address, owner number, owner first name, and owner last name for the property whose property ID is currently stored in IPROPERTYID provided as a parameter
Place these values in the variables ILOCATIONNUM, IADDRESS, IOWNERNUM, IFIRSTNAME, and ILASTNAME, respectively. Output the contents of ILOCATIONNUM, IADDRESS, IOWNERNUM, IFIRSTNAME, and ILASTNAME.
Task : Add the following record to the OWNER table:
INSERT INTO OWNER VALUESSA 'Sam', 'Afyouni', Hello St 'Anytown', MA;
Task : Create the UPDOWNERLASTNAMEprocedure to change the last name of the owner whose number is stored in IOWNERNUM provided as a parameter to the value currently found in ILASTNAME.
Task : Create the DELOWNER procedure to delete the owner whose number is stored in IOWNERNUM provided as a parameter
Task : Create the DISPPROPERTYS procedure to retrieve and output the office number, address, monthly rent, and owner number for every property whose square footage is equal to the square footage stored in ISQRFT provided as a parameter
Store these values in ILOCATIONNUM, IADDRESS, IMONTHLYRENT, and IOWNERNUM and display them when the procedure is called. From the textbook, A Guide to SQL th Edition hope you can read the lists in the photo
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started