I want to show the BookTitle, Firstname along with a COUNT of Copies. When I run the query, it gives an error saying to group. But when I group it says not a expression to group. Can someone help me?
SELECT bk.BookTitle, au.FirstName, COUNT(bkc.BookCopyID), rb.ReservedDate
FROM Book bk, Book_Author ba, BookCopy bkc, ReserveBook rb, Author au
WHERE
bkc.BookID = bk.BookID
AND ba.BookID = bkc.BookID
AND ba.AuthorID = au.AuthorID
AND bkc.BookCopyID = rb.BookCopyID
AND rb.ReservedDate >= trunc(trunc(sysdate,'MON')-1,'MON')
AND rb.ReservedDate < trunc(sysdate,'MON')
GROUP BY bkc.BookCopyID;