课程: SQL Hands-On Practice: Solve Business Problems

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Recoding and bucketing values using CASE

Recoding and bucketing values using CASE

- [Instructor] Let's see if we can find a solution to recode the numeric payment status codes into text so that the stakeholders can understand the categories on a dashboard. There's six different payment statuses that subscriptions can be in, and they are logged under current status in the subscriptions table. Let's first check out the status definition table to see all of the different status meanings. We'll use select star from status definition and we'll run this. Here, we can see all the different statuses that orders can go through during the payment process. For example, status ID 0 means that the user hit an error. Status ID 5 means the user completed the process and status ID 1 means the user opened the payment widget. Now that we understand the different status definitions, let's start pulling some data from the subscriptions table. We're going to start with select customer ID and subscription ID from the…

内容