Question: b) Write a SQL query that performs the following: a. Retrieve all users who joined Yelp between year 2016 and 2018 b. Find UserIDs of

 b) Write a SQL query that performs the following: a. Retrieve

b) Write a SQL query that performs the following: a. Retrieve all users who joined Yelp between year 2016 and 2018 b. Find UserIDs of users who have rate Mexican or Chinese restaurants. c. Find two different ways to write a SQL query that: Retrieves IDs of all BurgerKing rated by users who joined Yelp in 2018. d. Find taco restaurants whose average review is greater than 4

Users: The Users relation has the following columns (attributes): (1) UserID is a unique identifier for each user (2) name (3) yelping since UserID Name Alice Bob Yelping since 2011-01-01 2011-01-02 Businesses (assume they are restaurants): A business has a unique id, name. A business has one or more categories (stored in a string) BusinessID Name Taco bell Pita jungle Categories Tacos Mexican Mediterranean American Reviews: The Reviews relation consists of the following attributes: (1) UserID: the ID of a user that exists in the users relation. (2) BusinessId: the ID of a business that exists in the Businesses relation (2) Review: a numerical value between 1 and 5 that the user assigned to the business. Note that a user may review a business only once UserID BusinessID Review 1.5 4.0 2 Users: The Users relation has the following columns (attributes): (1) UserID is a unique identifier for each user (2) name (3) yelping since UserID Name Alice Bob Yelping since 2011-01-01 2011-01-02 Businesses (assume they are restaurants): A business has a unique id, name. A business has one or more categories (stored in a string) BusinessID Name Taco bell Pita jungle Categories Tacos Mexican Mediterranean American Reviews: The Reviews relation consists of the following attributes: (1) UserID: the ID of a user that exists in the users relation. (2) BusinessId: the ID of a business that exists in the Businesses relation (2) Review: a numerical value between 1 and 5 that the user assigned to the business. Note that a user may review a business only once UserID BusinessID Review 1.5 4.0 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!