question archive Use the following information for Questions 5 and 6

Use the following information for Questions 5 and 6

Subject:Computer SciencePrice: Bought3

Use the following information for Questions 5 and 6. You've been hired to work on a web site that maintains customer reviews of products. The main data is stored in the following tables: Product(ProductID, ProductName, Description) Reviewer(ReviewerID, ReviewerName, City) Review(ReviewerID, ProductID, Rating, Comment) The tables contain the following information: Product: unique product id (ProductID), product name (ProductName), and product description. All strings. Reviewer: unique reviewer id (ReviewerID), and reviewer name (ReviewerName) and city, also all strings. Review: One entry for each individual review giving the reviewer and product ids, an integer rating in the range 0 5, and the reviewer comment, which is a string. 

 

5. state a single SQL query that returns the number of reviewers in each distinct city. The results should list the city name and the number of reviewers in that city, and should be sorted alphabetically by city name. (10 points

 

6. state a single SQL query that returns the name of each reviewer and their average review rating only if their average review rating is less than or equal to 2. (10 points

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE