Your task is to answer the following questions. You must write the SQL statements (query) and Run the query against the tables in BOOK database. Paste your query in English, SQL command, and result...

1 answer below »
Your task is to answer the following questions. You must write the SQL statements (query) and Run the query against the tables in BOOK database. Paste your query in English, SQL command, and result into a notepad, word doc, or pdf using the following format
A notepad document to hold all queries, SQL code, and resultQuestion 1: LIST the Book code and book type for those books published by the publishercode 'JP'SELECT book_code, TYPEFROM bookWHERE publisher_code='JP';BOOK TYP0808 MYS8720 PSY9882 MYS...Query 1: List the book code and book title for books of type FIC, MYS, and ART, and order the books by title.Query 2: List the book code and book title of each book that has the type MYS and a price of less than $20.Query 3: List the book code, book title, and price of each book with a price between $10 and $20.Query 4: List the name of each publisher containing the word " and ".Query 5: List the book code for books without a title.Query 6: List the book code, book title, and book price. Order the books alphabetically and then by descending order of price.Query 7: List the count of distinct book types.Query 8: List the distinct book type and average book price for that type, further for only books in paperback, grouped by book type.Query 10: List the book type and average book price for paperback books having an average book price greater than $10.Query 11: By using subquery, list the author's last name, and first name for authors who have written books that were published in Boston.Query 12: By using subquery, list the book title and price of the least expensive books.Query 13: By using subquery, list the book code and title for books that are published in New York.Query 14: By using subquery, list the book code, title, and price whose price is larger than at least one book of type FIC.Query 15: By using subquery, list the book code, title, and price whose price is larger than the price of every book of type FIC.Query 16: By using JOIN, list each author's last name, and the number of books they've written.Query 17: By using JOIN, list the book code and book title for each book located in branch number 2 and written by author number 20.Query 18: By using JOIN, list the author's number, last name, and the number of books they've written.Query 19: By using Left Outer Join, list all book code available in branch 3 as wells book codes that are not available in branch 3.Query 20: List all book codes with more than two authors.
Answered Same DayJan 31, 2022

Answer To: Your task is to answer the following questions. You must write the SQL statements (query) and Run...

Kshitij answered on Feb 01 2022
104 Votes
1. select book_code,title from Book where type in ('FIC', 'MYS', 'ART') order by title
2.select boo
k_code,title from book where type ='MYS' and price<20
3.select book_code , title, price from book where price between 10 and 20;
4.select publisher_name from publisher where publisher_name like '%and%';
5.select book_code from book where title is null;
6.select book_code, title, price from book order by title, price desc;
7.select count(distinct type) from book group by type;
8. select type, avg(price) from book where...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here