Question: Consider the following database tables. Based on the given tables, Write an SQL query to retrieve the average rating for each author. Include the

Consider the following database tables. Based on the given tables, Write an SQL query to retrieve the average rating for each author. Include the author's name and the average rating in the view, and rename the average rating field as "AverageRating". Sort the result by the average rating in descending order. If necessary, you can create tables. Table: Books Book ID 1 2 3 4 Table: Reviews User ID 1001 1002 1003 1004 Table: Users User ID 1001 1002 1003 1004 Title To Kill a Mockingbird Pride and Prejudice The Great Gatsby 1984 Book ID 1 2 3 4 Username alice123 bob456 charlie789 david321 Author Harper Lee Jane Austen F. Scott Fitzgerald George Orwell Rating 4.5 4.2 3.9 4.7
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
emailID first name AUTHOR TOPIC topic name last name N 1 technical ... View full answer
Get step-by-step solutions from verified subject matter experts
