Question: 9: -- What is the average discount offered for different types of credit cards? [3 marks] -- Hint: Find out the average of discount for

9: -- What is the average discount offered for different types of credit cards? [3 marks] -- Hint: Find out the average of discount for each credit card type. SELECT c.credit_card_type, ROUND(AVG(o.discount), 3) AS avg_discount FROM order_t o JOIN customer_t c USING(customer_id) GROUP BY c.credit_card_type ORDER BY c.credit_card_type; observations and insights

Result: Passed Query 1 Query: SELECT c.credit_card_type, ROUND (AVG(o.discount), 3) AS avg_discount FROM order_to JOIN customer_t c USING(customer_id) GROUP BY c.credit_card_type ORDER BY c.credit_card_type Output: Showing first 10 rows out of 16 rows credit_card_type avg_discount americanexpress 0.616 bankcard 0.61 china-unionpay 0.622 diners-club-carte-blan... 0.614 diners-club-enroute 0.6 diners-club-international 0.584 diners-club-us-ca 0.615 instapayment 0.621

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!