With the information given, how do you create SQL statements for the following?
ID: 3717437 • Letter: W
Question
With the information given, how do you create SQL statements for the following?Provide a query that list all houses for sale (MLS#) and the number of days on the market;
Provide a query that list of customers (name, customer ID, and date of application) along with the MLS#, address, number of viewings that viewed a particular house. With the information given, how do you create SQL statements for the following?
Provide a query that list all houses for sale (MLS#) and the number of days on the market;
Provide a query that list of customers (name, customer ID, and date of application) along with the MLS#, address, number of viewings that viewed a particular house. With the information given, how do you create SQL statements for the following?
Provide a query that list all houses for sale (MLS#) and the number of days on the market;
Provide a query that list of customers (name, customer ID, and date of application) along with the MLS#, address, number of viewings that viewed a particular house.
Explanation / Answer
Solution:
Note: Schema is not shared, the query is based on the assumption of the schema.
Provide a query that list all houses for sale (MLS#) and the number of days on the market;
SELECT houseNumber, numberOfDays FROM HOUSE WHERE MLS# IS NOT NULL.
Provide a query that list of customers (name, customer ID, and date of application) along with the MLS#, address, number of viewings that viewed a particular house.
SELECT name, customer ID, and date_of_application, MLS#, address, number_of_viewings FROM CUSTOMER, HOUSE WHERE viewed IS NOT NULL.
please mention the schema in the comments if it doesn't match.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.