Question: Problem 2: Write the appropriate SQL that maps to the following functionality a) For (parts (1), (2), and (3)) below, find the suitable SQL query

Problem 2: Write the appropriate SQL that maps to the following functionality
a) For (parts (1), (2), and (3)) below, find the suitable SQL query that perform the same functionality
1) Retrieve all users who joined Yelp in 2018 and rated the Pita Jungle restaurant. 2) Find two different relational algebra ways to: Retrieve all restaurants rated by users that joined Yelp in either Year 2016 or 2018. 3) Find users who have rated every single business except Chinese restaurants
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
Get step-by-step solutions from verified subject matter experts
