IST 302 6CE part2.docx - Ruoyue Wang Professor Nagla Alnosayan IST302 10 October 2019 IST 302 Computer Exercise 6 Before answering each question review

IST 302 6CE part2.docx - Ruoyue Wang Professor Nagla...

This preview shows page 1 - 3 out of 8 pages.

Ruoyue Wang Professor Nagla Alnosayan IST302 10 October 2019 IST 302 Computer Exercise 6 Before answering each question, review Appendix B. Part B: for this part, you will use tables from IST302 database as source tables. 1 Create a copy of SALES table from IST302 database to your database. Name this table MY_SALES . SELECT * INTO newtable FROM oldtable WHERE condition; 2 Create a view PRODUCT_SUMMARY_V that has the Product ID , Year (i.e. year component of TIME_ID) , Month (i.e. month component of TIME_ID) , Total Amount Sold , Total Quantity Sold , and Average Sale Price (= Total Amount Sold/Total Quantity Sold ) for each product in the MY_SALES table. Round the Average Sale Price to 2 decimal places. Note: you should include
Image of page 1

Subscribe to view the full document.

WITH SCHEMABINDING option when creating the view to prevent underlying tables being changed under the view. 3 Create an indexed view 1 PRODUCT_SUMMARY_M that correspond to your PRODUCT_SUMMARY_V. ( HINT: you will get an error code 8668 if you simply create an indexed view using the same query as part B.2. The work around is to create an indexed view
Image of page 2
Image of page 3
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes