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
-
Determine the acceleration of the 30-kg block if the coefficient of kinetic friction is 0.7. 30 kg 400 N MK = .7 25
-
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...
-
The material for the bottom of a rectangular box costs three times as much per square foot as the material for the sides and top. Find the greatest volume that such a box can have if the total amount...
-
Managers use different types of control. Identify and define any four types of control used within Starbucks. Provide evidence from the case to support your answer.
-
Tax laws can change each year. Knowing the new rules can help you save money. Log On Go to finance07.glencoe
-
Richardson Company is contemplating the establishment of a share-based compensation plan to provide long-run incentives for its top management. However, members of the compensation committee of the...
-
PART 2: Complete the following section using Apple's Cash Flow Statement dated 12/31/20. 13. What is the total cash flow for Operating Activities? 14. What is the net income for the year? 15. What is...
-
Lawrence is a 16-year-old youth who was found guilty of vandalism and assault. He was convicted of breaking into his school with two friends and writing insulting slogans on the hallway walls. He was...
-
As a leader in the health care, what would you need to improve the quality of services to the patients?
-
Name two types of storage devices that can be used for client files that are processed with computer-assisted audit programs.
-
What is the common trait of all the computer-assisted audit program capabilities listed in the chapter?
-
What are computer-assisted audit programs?
-
The purpose of using computer-assisted audit programs is to test and analyze a clients computer a. Equipment. b. Systems. c. Records. d. Processing logic.
-
Take the following examples of output produced by computer-assisted audit programs and list a possible audit procedure that would be performed with each item of output. a. Listing of accounts...
-
City Condos Construction, CCC, obtained a loan to purchase city land for a premium condominium building. CCC paid a real estate analyst $100,000 to write a report on the market. The report stated...
-
An access route is being constructed across a field (Figure Q8). Apart from a relatively firm strip of ground alongside the field's longer side AB, the ground is generally marshy. The route can...
-
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...
-
Use the exponent distributive rule to expand \((2 \times 19)^{14}\).
-
Simplify the following: 1. \(\left(\frac{7^{9}}{10^{5} \times 6^{3}} ight)^{8}\) 2. \(\left(\frac{4}{a^{9} b^{6}} ight)^{2}\)
-
Use negative exponents to rewrite the following expressions with no denominator: 1. \(\frac{6^{3}}{13^{8}}\) 2. \(\frac{c^{5}}{2^{9}}\)
Study smarter with the SolutionInn App