m 30C Haze n 4. Question 4 An online store wants to analyze various aspects of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
m 30°C Haze n 4. Question 4 An online store wants to analyze various aspects of using coupons, including the distribution of discounts and savings. The company is developing a report that displays the total number of orders that used coupon codes and the average savings per order for orders using coupon codes. The result should have the following columns: total_orders | total amount | total_unique_coupons_uses | total savings | avg_savings_per_order. . . ● total_orders- the total number of orders that used coupon codes total amount - the total amount of orders that used coupon codes total_unique_coupons_uses- the total number of unique coupon codes that have been . redeemed total_savings - the total amount of money saved by using coupon codes, rounded to two decimal places avg_savings_per_order- the average savings per order for orders using coupon codes, rounded to two decimal places Note: Only orders that used coupon codes should be included in the report. Schema Schema . Only orders that used coupon codes should be included in the report. name id coupon_code discount percent name id coupon_id type INT VARCHAR(255) type INT INT INT to coupons total amount DECIMAL(5,2) coupons constraint PRIMARY KEY UNIQUE orders constraint Q Search PRIMARY KEY description Coupon Code ID Unique code of the coupon Percentage discount offered description Order ID Reference to the coupon Order total 30°C Haze 30°C Haze n ► Sample Data Tables ► Expected Output id coupon_code discount_percent 1 COUPON123 2 3 5 8 11 12 14 18 id coupon_id total amount 1 3 14 1 18 3 4 20 2 15 16 6 7 9 SAVE20 DISCOUNT50 1 1 1 1 1 1 1 2 2 2 2 2 2 3 coupons 3 3 null null null orders 34.10 80.06 94.57 84.04 50.30 9.03 10.49 JUDU 97.15 10.49 97.15 9.03 30 78.60 15.59 76.77 30 89.38 25 0.33 23.00 51.00 45.82 D ↳ Q Search Q Search 3-4/5 ALL O 3 4 5 6 7 8 2h 45m left ALL O 1 2 3 4 5 6 7 1 S 3 4 20 2 15 16 6 7 9 10 13 17 19 4 20 15 16 a. 6 7 9 10 13 17 2 19 2 ▸ Expected Output 2 2 13 3 3 3 null null null 15.59 Text selection has been disabled in this region null null null null 2 3 3 null null null null null null null ▾ Expected Output 97.15 9.03 78.60 15.59 76.77 89.38 0.33 23.00 51.00 45.82 81.98 47.72 2.09 68.56 78.60 89.38 0.33 23.00 51.00 45.82 81.98 47.72 2.09 68.56 total_orders total amount total_unique_coupons_uses total_savings avg_savinį 720.41 4 3 207.80 1! m 30°C Haze n 4. Question 4 An online store wants to analyze various aspects of using coupons, including the distribution of discounts and savings. The company is developing a report that displays the total number of orders that used coupon codes and the average savings per order for orders using coupon codes. The result should have the following columns: total_orders | total amount | total_unique_coupons_uses | total savings | avg_savings_per_order. . . ● total_orders- the total number of orders that used coupon codes total amount - the total amount of orders that used coupon codes total_unique_coupons_uses- the total number of unique coupon codes that have been . redeemed total_savings - the total amount of money saved by using coupon codes, rounded to two decimal places avg_savings_per_order- the average savings per order for orders using coupon codes, rounded to two decimal places Note: Only orders that used coupon codes should be included in the report. Schema Schema . Only orders that used coupon codes should be included in the report. name id coupon_code discount percent name id coupon_id type INT VARCHAR(255) type INT INT INT to coupons total amount DECIMAL(5,2) coupons constraint PRIMARY KEY UNIQUE orders constraint Q Search PRIMARY KEY description Coupon Code ID Unique code of the coupon Percentage discount offered description Order ID Reference to the coupon Order total 30°C Haze 30°C Haze n ► Sample Data Tables ► Expected Output id coupon_code discount_percent 1 COUPON123 2 3 5 8 11 12 14 18 id coupon_id total amount 1 3 14 1 18 3 4 20 2 15 16 6 7 9 SAVE20 DISCOUNT50 1 1 1 1 1 1 1 2 2 2 2 2 2 3 coupons 3 3 null null null orders 34.10 80.06 94.57 84.04 50.30 9.03 10.49 JUDU 97.15 10.49 97.15 9.03 30 78.60 15.59 76.77 30 89.38 25 0.33 23.00 51.00 45.82 D ↳ Q Search Q Search 3-4/5 ALL O 3 4 5 6 7 8 2h 45m left ALL O 1 2 3 4 5 6 7 1 S 3 4 20 2 15 16 6 7 9 10 13 17 19 4 20 15 16 a. 6 7 9 10 13 17 2 19 2 ▸ Expected Output 2 2 13 3 3 3 null null null 15.59 Text selection has been disabled in this region null null null null 2 3 3 null null null null null null null ▾ Expected Output 97.15 9.03 78.60 15.59 76.77 89.38 0.33 23.00 51.00 45.82 81.98 47.72 2.09 68.56 78.60 89.38 0.33 23.00 51.00 45.82 81.98 47.72 2.09 68.56 total_orders total amount total_unique_coupons_uses total_savings avg_savinį 720.41 4 3 207.80 1!
Expert Answer:
Answer rating: 100% (QA)
To create a report that displays the total number of orders that used coupon codes and the average savings per order for orders using coupon codes you ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
HR Trends Institute https://hrtrendinstitute.com/(Links to an external site.) HR Technology Discuss IT changes that you have experienced at work such as new cash register or inventory system or...
-
Renchen Company, which manufactures steel tubing and casing for automobile production, borrowed $500,000 on January 1 to finance the purchase of a new piece of machinery with new heating technology....
-
Imagination Dragons Corporation needs to raise funds to finance a plant expansion, and it has decided to issue 25-year zero coupon bonds with a par value of $1,000 each to raise the money. The...
-
Robert Carr is the founder of Heartland Payment Systems, Inc. Carr was heavily involved in negotiations with Global Payments, Inc., concerning the acquisition of Heartland by Global. During this...
-
In my opinion, we ought to stop making our own drums and accept that outside suppliers offer: said Wim Niewindt, managing director of Antilles Refining, N.V., of Aruba. At a price of 18 florins per...
-
Find the distance 'x' in this figure, accurate to 3 decimal places (i.e. 0.001"). (Hint: Locate two important points to form the required right-triangle to solve the question. The circle center is...
-
Acquiring Corporation transfers $500,000 stock and land with a value of $400,000 (basis of $250,000) to Target for most of its assets. The assets Target does not transfer to Acquiring in the Type A...
-
Consider the following two investment opportunities. The investor's MARR is 10% and the investor only has enough funds to invest in one of the projects. Which one should be chosen? 2 3 -800 215 215...
-
(b) Consider the following Verilog code implementing a finite state machine (FSM). (i) Draw the corresponding state transition diagram. Explain what this FSM does. (4 marks) (2 marks)
-
Jason deposits $5000 into his savings account at the end of every 3 months for 10 years. For the first 4 years, money accumulates at an annual nominal rate of 5% compounded quarterly. The interest...
-
1. A certain silicon gate NMOS transistor occupies an area of 252, where is the minimum lithographic feature size. (a) How many MOS transistors can fit on a 5 x 5 mm die if h = 0.5m? (b) 0.34 m? (c)...
-
Innovation is a process, ____ Group of answer choices a single event not a single event always a gradual one quite slow at times
-
Based on the data shown below, calculate the correlation coefficient (rounded to three decimal places) x y 4 13.88 5 13.9 6 17.12 7 17.64 8 20.86 9 20.18 10 19.9 11 21.12
-
Refer to the data in QS 10-1. Based on financial considerations alone, should Helix accept this order at the special price? Explain.
-
Expected manufacturing costs for Imperial Data Devices are as follows: Required Estimate manufacturing costs for production levels of 12,000 units, 15,000 units, and 17,000 units per month. Variable...
-
Classy Attire the designer and maker of elaborate prom dresses. The president of Classy wants to switch to an activity-based approach in the upcoming year to assign prices to the gowns. Production...
-
Tilden Financial Services has two divisions, Financial Planning and Business Consulting. The firms accountants are in the process of selecting an allocation base to allocate centrally provided...
-
Which mechanism of bacterial genetic transfer does not require recombination with the bacterial chromosome?
-
Explain why small deletions and duplications are less likely than large ones to have a detrimental effect on an individuals phenotype. If a small deletion within a single chromosome happens to have a...
-
Explain why inversions and reciprocal translocations do not usually cause a phenotypic effect. Then explain how they can do so in certain cases.
Study smarter with the SolutionInn App