主题:让俺晕死的SQL语句题
让俺晕死的SQL语句题
1.图书馆一本书有好几个副本, 显示副本最多的那本书的书名,如有几本书的副本数同时为最大,一起列出.
2.显示作者的名字,在数据库中有他的三本以上的书的,并同时在名字后显示这是第几本书.
哪位老大帮帮忙啊?
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.图书馆一本书有好几个副本, 显示副本最多的那本书的书名,如有几本书的副本数同时为最大,一起列出.
2.显示作者的名字,在数据库中有他的三本以上的书的,并同时在名字后显示这是第几本书.
哪位老大帮帮忙啊?
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)