考虑 BOOKSTORE 数据库的以下数据库模式:
Books (bookid, title, author, year)
Customers (customerid, name, email)
Purchases (customerid, bookid, year)
Reviews (customerid, bookid, rating)
Pricing (bookid, format, price)
我有这个问题:
查找有关“CIVIL WAR”(即标题包含“CIVIL WAR”)的书籍的评分信息(显示标题、作者和平均评分)。
到目前为止,我得到的是:
SELECT title, author, AVG(r1.rating)
FROM Books, Reviews
WHERE title LIKE '%CIVIL WAR%'
但它是错误的:(任何帮助将不胜感激:D