From the course: Advanced MySQL Data Analysis
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Solution: Analyzing seasonality - MySQL Tutorial
From the course: Advanced MySQL Data Analysis
Solution: Analyzing seasonality
- [Instructor] All right, this is the solution video for your assignment on, "Analyzing seasonality." As a reminder, Cindy is looking for weekly and monthly session, and order volume patterns so that she can see what happened in 2012 in order to better prepare for 2013. Your results should look like this. You'll have two queries, one trending monthly, your, "Sessions" and "Orders," and one trending those same metrics, sessions and orders, by week. Let's walk through the solution now. So at this point, pulling sessions and orders should be pretty familiar to you. We've got our, "Count distinct website sessions dot website session ID," as our sessions. And then we're left joining to the orders table, using website session ID to get there. And we're doing a, "Count distinctive orders" and we're calling that, "Orders." So I'll run this query. And here, we've got our total sessions and orders for the entire year of 2012, 'cause we're pulling everything up until 2013. So next, what we need…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.