Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The management is curious about how certain changes in the purchase process at WORMS may have affected sales. For all purchases made on or after

image text in transcribed

The management is curious about how certain changes in the purchase process at WORMS may have affected sales. For all purchases made on or after May 1, 2018, management wants to see how the quantity of each buyer's purchase compares with the average quantity of that buyer's purchase from before May 1, 2018. Write a query to display the buyer number, purchase date, purchase quantity, the pre-May average purchase quantity, and the amount the current purchase differs from the pre-May average quantity for purchase made on or after May 1, 2018 by each buyer. The pre- May average is the average of the purchase quantities for all purchases made by that buyer wwith a purchase date that is before May 1, 2018. Sort the output by the buyer number and then by The purchase date. MATERIAL DEPOSIT SITE PK Dep ID Site Num Mat ID --- Dep Date > LH--- Mat_Name Mat_Type Mat_aty Mat_Price Dep Cty FK1 Mat_ID FK2site_Num Site Name Site Street Site_City Site State Site Up BUYER PURCHASE PK Buyer Num Purch_Num ----- - Purch_Date > Purch Oty Purch Price Mat_ID Buyer Num Buyer_Company Buyer_FName Buyer_LName Buyer_AreaCode Buyer Phone FK1 The management is curious about how certain changes in the purchase process at WORMS may have affected sales. For all purchases made on or after May 1, 2018, management wants to see how the quantity of each buyer's purchase compares with the average quantity of that buyer's purchase from before May 1, 2018. Write a query to display the buyer number, purchase date, purchase quantity, the pre-May average purchase quantity, and the amount the current purchase differs from the pre-May average quantity for purchase made on or after May 1, 2018 by each buyer. The pre- May average is the average of the purchase quantities for all purchases made by that buyer wwith a purchase date that is before May 1, 2018. Sort the output by the buyer number and then by The purchase date. MATERIAL DEPOSIT SITE PK Dep ID Site Num Mat ID --- Dep Date > LH--- Mat_Name Mat_Type Mat_aty Mat_Price Dep Cty FK1 Mat_ID FK2site_Num Site Name Site Street Site_City Site State Site Up BUYER PURCHASE PK Buyer Num Purch_Num ----- - Purch_Date > Purch Oty Purch Price Mat_ID Buyer Num Buyer_Company Buyer_FName Buyer_LName Buyer_AreaCode Buyer Phone FK1

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Auditing A Quality System For The Defense Industry

Authors: Charles B. Robinson

1st Edition

0873890787, 978-0873890786

More Books

Students also viewed these Accounting questions

Question

Please make it fast 3 9 1 .

Answered: 1 week ago