Hey guys, im in deep need of help for mysql. Ive been given a few questions most of them answered although theres 3 which are really bringing me down. I was wondering if u could get some help :D
Given this schema
borrow(transactionID, personID*, borrowdate, duedate, returndate)
author(authorID, firstname, middlename, lastname)
book_copy(bookID, bookdescID*)
book(bookdescID, title, subtitle, edition, voltitle, volnumber, language, place, year, isbn, dewey, subjectID*)
borrow_copy(transactionID*, bookID*)
person(personID, firstname, middlename, lastname, address, city, postcode, phonenumber, emailaddress, studentno, idcardno)
publisher(publisherID, publisherfullname)
written_by(bookdescID*, authorID*, role)
published_by(bookdescID*, publisherID*, role)
subject(subjectID, subjecttype)
1. i need to display the firstname and lastname of the people who returned books more than 7 days late.
-i tried using the datediff function although it came back as invalid, is there another way?
2. A borrower wants to borrow the book titled "PRINCIPLES AND PRACTICE OF DATABASE SYSTEMS", but finds out all of its copies are already borrowed by others. Write two queries to display other recommended titles using the following methods.
- Using partial matching of the query string -- note that the borrower is interested in a "DATABASE" book.
- By searching of other books borrowed by people who also borrowed the above title
-this killed me, im clueless
and my last one
3. i have to display the title of the book which has most physical copies. If there are more than one book with the largest number of copies, show them all. Your query should show the number of copies along with the title.
-eh? lol
Help with these would be great, describing what you did would be a bonus but then again i'm asking for too much. Any help would be appreciated. Thankyou
N