From the course: Advanced MySQL Data Analysis

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Solution: Analyzing product refund rates

Solution: Analyzing product refund rates - MySQL Tutorial

From the course: Advanced MySQL Data Analysis

Solution: Analyzing product refund rates

- [Instructor] Hi, everyone. This is the Solution Video for your assignment on product refund rates. As a reminder, Cindy's hoping that you can pull monthly product refund rates by product and confirm that the previous quality issues have been addressed. Our results are going to look like this with year and month as our dimensions, and then the count of product one orders, product two orders, product three orders, and product four orders, as well as the refund rates for each of those respective products. Let's jump into Workbench and walk through the solution. Here we've got the solution query. The code is less complicated than it looks. I'll start by explaining the FROM and the LEFT JOIN. So, we're starting with order_items. Order_items will help us understand which product was purchased, and then we're going to LEFT JOIN to order_item_refunds using that order_item_id. This is how we'll figure out which of the items were refunded. And we're looking at all data up until October 15th…

Contents