Description
Please show an appropriate SQL SELECT statement to answer each of the following. Some of the problems will require nested SELECT statements (due to NOT EXISTS). You may also get up to 5 points of extra credit (total) by using the mysql command line utility to run your queries and paste the results into your solution for each question. See the sample output below.
Unformatted Attachment Preview
Purchase answer to see full attachment
Explanation & Answer
Attached. Please let me know if you have any questions or need revisions.
1. Find the propId, locDesc, and state for properties with a propType equal to "T"
(i.e., traditional)
Sql Statement
SELECT propId,locDesc,state
FROM property
WHERE propType = "T";
Screenshot
2. Find the propId and startDt for properties which the customer named Ava
Kashun has a rental.
Sql Statement
SELECT r.propId, r.startDt
FROM rental AS r
WHERE EXISTS (SELECT c.name FROM customer AS c WHERE r.custNr = c.custNr AND c.name
= "Ava Kashun")
Screenshot
3. Find the property ID and locDesc of properties in TX (state) which have a start
date after "2019-11-03" for the customer named "Perry Scope".
SQL Statement
SELECT p.propId, p.locDesc
FROM property AS p, rental AS r,customer AS c
WHERE p.propId = r.propId AND r.custNr = c.custNr...