From the course: Advanced MySQL Data Analysis

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Finding top website pages

Solution: Finding top website pages - MySQL Tutorial

From the course: Advanced MySQL Data Analysis

Solution: Finding top website pages

- [Instructor] Alright, this is the solution video for your assignment on Identifying Top Website Pages. As a reminder, Morgan, the new website manager, is trying to get your help to understand the most viewed website pages ranked by session volume. Let's jump into Workbench and walk through the solution. Alright, so we're looking for website page views that get the most traffic and hopefully this part was pretty obvious, but you'll be going into the website_pageviews table. So we can see the columns that are in here. We have the pageview_id, the created_at, the sessions that are associated with those page views. And then the pageview_url. And this part is what Morgan really cares about. So we'll do SELECT pageview_url and we'll say FROM website_pageviews. And we'll do a COUNT (DISTINCT) website_pageview_id AS page views. And then we're going to do a GROUP BY because we're using our COUNT here. We need a GROUP BY anytime we use our aggregate functions. And we'll be grouping by…

Contents