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

免费学习该课程!

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

Solution: Payment funnel analysis with CTEs

Solution: Payment funnel analysis with CTEs

- [Instructor] Okay, now that we've gotten some practice with CTEs, let's break down this problem. And I'm going to be honest here, this is definitely a challenge and it might have taken a while, but funnel analyses are a super common business problem that's extremely recognizable by hiring managers. This also requires, not just SQL skills, but understanding the business logic behind it. I've already given you the code on lines 3 through 13 that categorize the max and current statuses into business logic using a case statement with many conditions. So if you want to uncomment that and use my code, you can. However, you'll still need to create the max status reached CTE and integrate it into another CTE, called payment funnel stages. That uses the max status and current status of each subscription to categorize them into the business logic. The business logic defined in the case statement provides specifics on which payment…

内容