Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started