Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. List the title from the titles table, the order number and order date from the sales table, and the store name from the
1. List the title from the titles table, the order number and order date from the sales table, and the store name from the stores table. Display only the first 30 characters of the title column. There should be a row produced in the result set for each row in the titles table. Order the result set by the order number. The query should produce the result set listed below. (Hint: LEFT OUTER JOIN statement) title Net Etiquette The Psychology of Computer Coo The Gourmet Microwave Straight Talk About Computers Bookshop Silicon Valley Gastronomic Tre Bookshop You Can Combat Computer Stress Bookshop (23 row(s) affected) ord_num stor_id stor_name P2121 P2121 ord_num TQ456 7896 423LL930 8042 P723 8042 NULL NULL 423LL922 (11 row(s) affected) Q02299 Fricative Bookshop Bookbeat Bookbeat TQ456 X999 7067 News & Brews 7067 News & Brews N914008 7131 Doc-U-Mat: Quality Laundry and Books ord_date NULL NULL 1994-09-14 00:00:00.000 1993-12-12 00:00:00.000 2. Using the INSERT command, add two books to the titles table. The first book has a title id of ZZ1234, title of Microsoft SQL Server, type of computer, publisher id of 0877, price of $89.99, and a publish date of September 29, 2008. The second book has a title id of TT2345, title of Designing Databases, type of computer, publisher id of 1389, priced of $168.98, and a publish date of January 1, 2009. 1993-10-28 00:00:00.000 Fricative 1993-02-21 00:00:00.000 3. List the sum of the order cost (quantity*price) for each order by store id, store name, order number, quantity, title, and price where the sum of the order cost is between $150.00 and $500.00. Display the order number, store id, and quantity from the sales table, the store name from the stores table, the price from the titles table, and the sum of the order cost. The query should produce the result set listed below. g|gzx_and 20 20 stor_name price NULL NULL Bookbeat 11.95 14.99 10.95 19.99 19.99 11.95 Fricative Fricative order_cost 239.00 299.80 219.00 199.90 199.90 298.75 4. Using the UPDATE command, increase the price by 10% for the book Microsoft SQL Server with a title id of ZZ1234. 5. Create a new table called BusinessBooks containing the title id, title, and price columns along with the data from the titles table which have a type of business. There should be 4 rows inserted into the new table.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started