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

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. :)

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