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...
-
Britain's Health and Safety Commission (HSC) provides information and proposes regulations to protect workers against health and safety risks. In its Strategic Statement, issued in June 2000, HSC...
-
Watercrafts predetermined overhead rate is 200% of direct labor. Information on the companys production activities during May follows. a. Purchased raw materials on credit, $200,000. b. Materials...
-
The transactions for Little Tykes Daycare, Inc., for the month of January 2010 are posted in the following T-accounts. Requirements 1. Calculate account balances. 2. Prepare the trial balance for...
-
For fiscal year 2011, Starbucks Corporation (SBUX) had total revenues of $11.70 billion, net income of $1.25 billion, total assets of $7.36 billion, and total shareholders equity of $4.38 billion. a....
-
Gross profit Expenses Sales salaries Supplies used Depreciation-Equipment Rent Utilities Share of office department expenses Total expenses Income 122,400 47,500 169,900 20,500 8,700 29,200 650 400...
-
Dwight Donovan, the president of Donovan Enterprises, is considering two investment opportunities. Because of limited resources, he will be able to invest in only one of them. Project A is to...
-
The following journal entries were prepared and posted by an employee of International Marketing Company who does not have an adequate knowledge of accounting. Date 20X1 GENERAL JOURNAL Description...
-
Kathy weighs 150 lbs. and has consumed three Standard Drinks in two hours. Her approximate BAC would be: O 0.01 O 0.03 O 0.06 O 0.12
-
what value is stored in the variable result. int a = 9; int b = 2; int c = 3; int result = 2; a -= c; a %= b; result -= ((++a)+c)/++c;
-
Perez Company acquires an ore mine at a cost of $1,400,000. It incurs additional costs of $400,000 to access the mine, which is estimated to hold 1,000,000 tons of ore. 180,000 tons of ore are mined...
-
Language: SmallTalk To make: instance side variable named " grade: pct " Output: " Assume that argument score is an integer. Return a character letter grade according to the following table: Score...
-
Given the following information, use the forward margin formula to determine the forward margin. AUD/USD spot rate 0.9000 AUD 90 day interest rate 4.00% USD 90 day interest rate 1.00%
-
Q16. Which of the following statements are true about NO ligand. I. Can act as monodenate ligand II. Can act as bidentate ligand III. Act as flexidentate ligand IV. Act as Ambidentate ligand (a) I &...
-
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...
-
Your company sells \(\$ 100,000\) of goods and you collect sales tax of \(3 \%\). What current liability does the sale create? a. . Yone; you collected cash up front. b. Unearned revenue of \(\$...
-
At December 31, your company owes employees for three days of the five-day workweek. The total payroll for the week is \(\$ 8,000\). What journal entry should you make at December 31? a. Nothing,...
-
Payroll expenses include a. Salaries and wages b. Employee benefits c. Payroll taxes d. All of the above
Study smarter with the SolutionInn App