Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Specify the following queries in SQL on the following database schema (keys are

ID: 3148191 • Letter: S

Question

Specify the following queries in SQL on the following database schema (keys are in bold and underline): Customers(custID: String, cName: String, phone: String) Preferences(custID: String, fID: String) Agents(agentID: String, agentName:String) Houses(addressID: String, address: String, ownerID: String, agentID: string, firstDateOnMarket: DATE, forSalePrice: real) Owners(ownerID: String, ownerName: String, phone: String) Amenity(addressID: String, fID: String) Features(fID: String, category: string, description: string) The domain of each attribute is listed after the attribute name. The primary key attributes are underlined. The table Preferences lists all features required by the customer. In other words, each tuple describes a customer’s one preference feature ID; e.g., {(A1001, bd5), (A1001, ba3), (A1001, lot1}. A customer is interested in buying a house, if the set of all features specified by the customer is a subset of the amenities the house has. A record in the table House states who is the owner, and who is the real estate agent listing the house. Write the following queries in SQL.

Query4: Drop the price by 5% of houses that have been listed on the market for more than one year.

Explanation / Answer

Please find the answer of given question 4

UPDATE House set forSalePrice=forSalePrice-forSaleprice*5/100

where firstDateOnMarket<=(select ADD_MONTHS(SYSDATE, -(12 * 1)) from dual;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote