Question: Write a SQL query to find the top - rated book titles along with their authors. Consider only books with reviews, and for each book,
Write a SQL query to find the top rated book titles along with their authors. Consider only books with reviews, and for each book, calculate the average rating of the books that are published in the same year including the book itself Return the book title, author name, and the calculated average rating. Sort the results in descending order by the average rating.
Tables Schema as Below:
authors
columnName dataType
id INT
name VARCHAR
birthyear INT
deathyear INT
book
columnName dataType
id INT
authorid INT
title VARCHAR
publishyear INT
publishinghouse VARCHAR
rating DECIMAL
bookreview
columnName dataType
bookid INT
review TEXT
author VARCHAR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
