Using the following relations to write SQL statement that follows: Author ( Auth
ID: 3710980 • 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).
Please the answer should typing, not scanning or photos
Explanation / Answer
1. select * from Book_descriptions where Price<35;
2. select * from Author order by FIRST_NAME, LAST_NAME;
3. select ISBN, Title, Price, Publisher, Pub_Date, Edition, Pages, Author_ID, FIRST_NAME
from Author as a, Book_authors_books as b, Book_descriptions as c
where c.ISBN=b.ISBN and b.Author_ID=a.Author_ID and Price>=ALL(select Price from c);
4. Update Book_descriptions
set price = price+price*0.1
where Pub_date = 2015;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.