I’m trying to run this SQL command but it’s giving me an error that the SQL command is not properly ended. Note, I’m using Oracle’s 11g.
SELECT BookTitle.btName, BookTitle.Isbn FROM BookTitle AND SELECT COUNT(Isbn)
FROM BookTitle
JOIN Loan ON (Borrower.borId = Loan.borId)
JOIN BookCopy ON (Loan.bcId = BookCopy.bcId)
JOIN Authorship ON (BookCopy.isbn = Authorship.isbn)
JOIN Author ON (Author.authorID = Authorship.authorID)
WHERE Loan
ORDER BY Loan.dateOut DESC;
Can you kindly guide me to what’s wrong ?

have several tables Book Title, BookCopy, Authorship, Loan, Author, Publisher and Borrower. I need to find the most borrowed book and list all titles and isbn.
BookTitle contains ISBN(PK), btName, datePublished, pubId*, ageLower, ageUpper, value.
Borrower contains borID(PK), borName, borAddress and borMaxbook
BOokCopy cvontains bcID(PK), ISBN*, dateAcquired, dateDestroyed
oan contains borID(PH)*, bcID(OK)*, dateOut(FK), dateDue and dateBack
Publisher contains PubId(PK), pubName and pubAddress
Publisher cotains PubID(8), pubName, pubAddress
Authoer contains authorID(PK) and authorName
Authorship contains authorId*, and ISBN*
1 Answer