From the course: SQL Hands-On Practice: Solve Business Problems
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Solution: Explore variable distributions with CTEs - SQL Tutorial
From the course: SQL Hands-On Practice: Solve Business Problems
Solution: Explore variable distributions with CTEs
- [Instructor] Welcome back. This problem is one of my favorites because it involves some data wrangling to reshape the data in the way that we want it. Plus finding the distribution of a variable is a super common live coding interview question for all data roles, so definitely make sure you understand this concept. Let's explore the frontend event definitions table by running select star from frontend event definitions. And now let's run it. Notice that it says incorrect output. That's okay because we're not done writing our query yet. We still have some work to do, but you can see how event ID number five is clicked link inside email. That's the event we're going to want to track. All right, now let's erase this query and write the real query for this problem. To count the number of events per user for event ID five, let's start with select star from. We're going to pull from the frontend event log table and we're…
Contents
-
-
-
(Locked)
Summarizing customer data for leadership2m 14s
-
(Locked)
Combining aggregate functions with CTEs6m 49s
-
(Locked)
Introduction to CTEs3m 36s
-
(Locked)
Solution: Pull descriptive statistics with a CTE7m 51s
-
(Locked)
Solution: Explore variable distributions with CTEs5m 20s
-
(Locked)
Solution: Payment funnel analysis with CTEs10m 56s
-
(Locked)
-
-
-
-
-