Question: Students should be able to; 1 . USE a dataset in Access format 2 . EXPLAIN the relationship between entities 3 . APPLY SQL to
Students should be able to;
USE a dataset in Access format
EXPLAIN the relationship between entities
APPLY SQL to retrieve the required information from a database
Database Information:
airbnb.accdb contain two tables:
Listings Table contains information of some listings ie properties listed on airbnb.com website; Fields: listingid listingurl, name ie names of listings hostid hostname, hostresponsetime, neighbourhood, neighbourhoodgroup, city, state, propertytype,
accommodates, beds ie the number of beds price, numberofreviews, reviewscoresrating, cancellationpolicy
Reviews Table contains the reviews given to different listings listed in the Listing Table. Fields: listingid id date, reviewerid reviewername, comments
Q: Data Type and EntityRelationship
What is the data type for listingURL?
Describe how data in tables are related. Justify your answer using an
example from the data provided in the tables. Hint: use connectivity
and cardinality to explain your answerDescribe; Example
Q: SQL
Write a SQL statement to display listing names and property types of all the listings.
Write a SQL statement to display the distinct property types of all the listings.
Write a SQL statement to display the name, price, and city for Apartment type of listings.
Write a SQL statement to display the name, price, city, and neighbourhood for Apartment, House, and Cabin types of listings.
Write an SQL statement to display the name, price, and propertytype of listings that offer accommodation in a range of to
Write an SQL statement to display the unique reviewer names who made comments on listings with a strict cancellation policy.
Write an SQL statement to display the host name, listing name, price, and price per beds of listings with Beautiful anywhere in the name field.
Write an SQL statement to display the neighborhood and number of listings for each neighborhood to show the total supply in the neighborhood based on the number of listings. Rename the frequency column as neighborhoodsupply in the above SQLHint: Use COUNT and GROUP BY Use the COUNT function to get the listing count.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
