From the course: Database Foundations: Intro to Databases
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Query summary statistics
From the course: Database Foundations: Intro to Databases
Solution: Query summary statistics
(upbeat music) - [Instructor] For this final code challenge of the course, we're tasked with getting some summary statistical information about a music streaming service. And we need to find the popularity of different music genres. So I'm going to start by running the select statement just to see the music tracks data that we have to work with. It looks like we have a total of 30 different rows here. So each of these represents a different musical track. We have the track ID, the title, artist name. We have the genre that the track is in. The number of times that particular track has been played by the subscribers of the streaming service. The album that the track came from, as well as its release date. And so this is all the data that we are going to summarize by the various musical genres. So the first thing we need to do is just get that genre column. So I'll say instead of SELECT *, I'll say SELECT Genre FROM MusicTracks, and we need to group everything by the genre. I'm going to…
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.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Display column aliases with AS4m 59s
-
(Locked)
Mathematical operations3m 20s
-
(Locked)
Use built-in functions5m 51s
-
(Locked)
Aggregate data with GROUP BY3m 34s
-
(Locked)
Filtering groups with HAVING3m 13s
-
(Locked)
Challenge: Query data1m 3s
-
(Locked)
Solution: Query data9m 39s
-
(Locked)
Solution: Query summary statistics6m 57s
-
(Locked)
-