We are given the relations Restaurant(rID, name, owner) and Rating(rID, stars).
ID: 3913645 • Letter: W
Question
We are given the relations Restaurant(rID, name, owner) and Rating(rID, stars). Some owners have multiple restaurants. Find all the owners (without duplicates) that have a restaurant that received a rating of 1 or 5 SELECT DISTINCT Restaurant.owner FROM Restaurant, Rating WHERE Restaurant. rID-Rating. rID AND (Rating. stars = 1 0R Rating. stars-5) SELECT Restaurant.owner FROM Restaurant, Rating WHERE Restaurant.rIDRating.rID AND Rating.stars -1 OR Rating.stars-5 SELECT DISTINCT Restaurant.owner FROM Restaurant, Rating WHERE Restaurant.rIDRating.rID AND Rating.stars-1 OR Rating.stars-5Explanation / Answer
Correct Option = Option a
SELECT DISTINCT RESTAURANT.OWNER FROM RESTAURANT, RATING WHERE RESTAURANT.RID = RATING.RID AND (RATING.STARS = 1 OR RATING.STARS = 5);
Please let me know in case of any clarifications required. Thanks!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.