Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the following relations to write SQL statement that follows: Author ( Auth

ID: 3716192 • Letter: U

Question

Using the following relations to write SQL statement that follows:

Author (Author_ID, FIRST_NAME, LAST_NAME)

Book_authors_books (ISBN, Author_ID)

Book_descriptions (ISBN, Title, Price, Publisher, Pub_date, Edition, Pages)

1-         Retrieve all the books that cost less than 35.

2-         Retrieve all the authors in alphabetical order(A-Z).

3-         Retrieve all the possible information about the most expensive book that published by "New Math" publisher (the data should include authors).

4-         Increase price value by 10% of all books that published in 2015 (use update).

Explanation / Answer

1) SELECT Title

FROM Book_descriptions

WHERE Price < 35;

2) SELECT FIRST_NAME,LAST_NAME

FROM Author

ORDER BY FIRST_NAME,LAST_NAME;

3) SELECT Author_ID,FIRST_NAME,LAST_NAME,ISBN, Title, Price, Publisher, Pub_date, Edition, Pages

FROM Book_descriptions,Book_authors_books,Author

   WHERE Book_descriptions.ISBN=Book_authors_book.ISBN AND Book_authors_book.Author_ID=Author.Author.ID AND Publisher='New Math' AND Price >= ALL ( SELECT Price

FROM Book_descriptions WHERE  Publisher='New Math' );

4) UPDATE Book_descriptions

SET Price = Price*1.1

WHERE Pub_date = '2015';