From the course: Advanced MySQL Database Administration
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Solution: Creating views - MySQL Tutorial
From the course: Advanced MySQL Database Administration
Solution: Creating views
- [Instructor] All right, this is the solution video for your assignment on creating views. As a reminder, your marketing lead, Brent has reached out because he wants you to create a view that can summarize website session data for him in the database. The metric that he is looking for is number of sessions, and he wants that sliced by year, month, UTM source and UTM campaign. So here's a preview of what it should look like once we put this view together, and you can see why this is valuable. He can do a simple select star from the view and he can see all of the data. He doesn't have to understand the code behind how this view was created. Views are one way that we can handle reporting for people who are less heavy SQL users and still allow them to get the information that they need to do their jobs. So let's jump into Workbench and we can walk through this. Alright, so here we've got our website sessions table. I'm going to expand that so we can see the columns that we have…
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.