A.) Write a query based on the BOOKS table which will retrieve the title and mon
ID: 3720089 • Letter: A
Question
A.) Write a query based on the BOOKS table which will retrieve the title and month published for all books which were published in the calendar year 2001. Arrange the list in chronological order by date published. Do not use any logical operators in your query.
B.) Write a query based on the BOOKS table which will retrieve all book titles that are in the Business or Computer category and have a retail price of more than $35.00.
C.) Write a query which will determine the price of the most expensive book in the books table.
D.) Write a query based on the BOOKS table which will display a category and the average profit for books within that category. Profit is the difference between the retail price and the cost.
E.) Write a query based which will determine the number of books which have been shipped in each category. Identify (list) the category in the output.
F.) Write a query which will determine the number of categories contained in the BOOKS table.
BOOKS Table Name Null Type NOT NULL VARCHAR2 (10) ISBN TITLE PUBDATE PUBID COST RETAIL DISCOUNT CATEGORY VARCHAR2 (30) DATE NUMBER (2) NUMBER (5,2) NUMBER (5,2) NUMBER (4,2) VARCHAR2(12) Chegg Study TEXTBOOK SOLUTIONS EXPERT ORA 053031150MINUTES A DAY 21-JAN-0S 0401140733 REVENGE OF MICKEY 4981341710 BUILDING A CARWTH TOOTHPICKS 18-MAR-08 8843172113 DATABASE IMPLEMENTATION 3437212490 COOKING MITH MUSHROOMS 3957136468 HOLY GRAIL OF ORACLE 1915762492 HANDCRANKED COMPUTERS 9959789321 E-BUSINESS THE EASY WAY 2491748320 PAINLESS CHILD-REARING 0299282519 THE WOK WAY TO COOK 8117949391 BIG BEAR AND LITTLE DOVE 08-NOV-05 0132149871 HOW TO GET FASTER PIZZA 9247381001 HOW TO MANAGE THE MANAGER 09-MAY-03 2147428890 SHORTEST POEMS 18.75 14.2 (nun FITNESS (null) FAMILY LIFE 30.95 14-DEC-05 3 CHILDREN (null) COMPUTER (null) cooKING 2 378 59.95 3 31.4 55.95 4 12.5 19.95 3 47 25 75.95 25 379 545 48 89.95 19 28.75 532 895 4 1785 29.95 1 15431.95 5 21.85 39.95 28-FEB-04 31-DEC-05 21-JAN-05 01-MAR-06 17-JUL-04 11-SEP-04 3 8 COMPUTER (nu) COMPUTER (null) COMPUTER 3 218 45 FAMILY LIFE (nuln cooKING (null) CHILDREN 1.5 SELF HELP (null) BUSINESS (null) LITERATURE 11-NOV-06 01-MAY-05 FIGURE A-4 Data in the BOOKS tableExplanation / Answer
1)Select title,month(pubdate) from BOOKS where
year(pubdate)=2001 order by date(pubdate);
2)Select title from BOOKS where category=('Business' or 'computer') having retail>35.00;
3)Select max(retail) from BOOKS;
4)Select category,avg(cost-retail) "average" from BOOKS group by category;
5th query is not very clear to me so if you want it, then clarify what exactly you want in the comment section.
6)select count(categories) from BOOKS;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.