Book1 (id, title, authors, pubyear, pubmonth, pubday, edition, publisher, isbn13, language, series, pages) Book2 (id,_book_title, authors, publication_year, publication_month, publication_day, edition, publisher_name, isbn13, language, series, pages) Book3 (ID, Title, Author1, Author2, Author3, Publisher, ISBN13, Date, Pages, ProductDimensions, SalesRank, Ratings Count, RatingValue, PaperbackPrice, HardcoverPrice, EbookPrice, AudiobookPrice) Book4 (ID, Title, UsedPrice, NewPrice, Author, ISBN10, ISBN13, Publisher, Publication_Date, Pages, Dimensions)
Question 1: [2 marks] Given four datasets that are stored in one relational database as separate relations. (1) Write an SQL query "Find the top 5 books that have the highest ratings and 5 books that have the lowest ratings, return their SalesRank (sorted in descending order), titles, publishers, and number of pages". (2) Which table schema(s) is/are used to answer the above query?
Book1 (id, title, authors, pubyear, pubmonth, pubday, edition, publisher, isbn13, language, series, pages) Book2 (id,_bo
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Book1 (id, title, authors, pubyear, pubmonth, pubday, edition, publisher, isbn13, language, series, pages) Book2 (id,_bo
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!