Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the MI database, create an SQL script named MI-Create-Views-and- Functions.sql to answer parts M-R M. Write an SQL statement to create a view called

image text in transcribed

Using the MI database, create an SQL script named MI-Create-Views-and- Functions.sql to answer parts M-R M. Write an SQL statement to create a view called PurchaseSummaryView that shows only ITEM.ItemID, ????.PurchaseDate, ITEM.Item Description, and ITEM.PriceUSD Run the statement to create the view, and then test the view with an appropriate SQL SELECT statement. Create and test a user-defined function named StoreContactAndPhone that combines two parameters named StoreContact and ContactPhone into a concatenated data field formatted StoreContact: ContactPhone (including the colon and space) N. O. Write an SQL statement to create a view called StorePurchaseHistoryView that shows STORE.StoreName, STORE.Phone, STORE.Contact, ITEM.ItemID, ITEM.PurchaseDate, ITEM.ItemDescription, and ITEM.PriceUSD. Run the state ment to create the view, and then test the view with an appropriate SQL SELECT statement. Write an SQL statement to create a view called StoreContactPurchaseHistoryView that shows STORE.StoreName, the concatenated result of STORE.Phone and STORE.Contact from the StoreContactAndPhone function, ITEM.ItemID, ITEM.PurchaseDate, ITEM.ItemDescription, and ITEM.PriceUSD. Run the state- ment to create the view, and then test the view with an appropriate SQL SELECT statement. P

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions