Mastering the COUNT Function

Introduction

Hello and welcome to our journey through Mastering SQL Functions with Taylor Swift! In this course, we're going to embark on an engaging journey, honing our SQL skills while navigating the world of Taylor Swift's discography.

In today's lesson, we'll delve into the basics of SQL functions, with a particular focus on the COUNT function. This function serves as a convenient tool when conducting quantitative analysis of our data set, such as determining the total number of records in a table. So, let's get started!

Dataset Introduction

In case you haven't done any of our other courses using this dataset, here is a quick overview for you. Below are some sample rows to give you an idea of the structure starting from the simplest table:

Albums Table

AlbumIDAlbumNameReleaseDate
22Speak Now (Deluxe Edition)2010-10-25
23Speak Now2010-10-25
24Fearless Platinum Edition2008-11-11
25Fearless2008-11-11

Albums table contains all of Taylor's albums including release dates.

Songs Table

SongIDAlbumIDNameTrackNumberURIPopularityDurationMS
0vqI4ZIMuifeKeItGiWbPj19Starlight15spotify:track:0vqI4ZIMuifeKeItGiWbPj40217826
0vvt4IZOMkRug195S4MUq022If This Was A Movie16spotify:track:0vvt4IZOMkRug195S4MUq046234546
0wavGRldH0AWyu2zvTz8zb6Sweet Nothing12spotify:track:0wavGRldH0AWyu2zvTz8zb73188496
0XfOV7qY3834QpFVwOb6CC19Treacherous3spotify:track:0XfOV7qY3834QpFVwOb6CC41240773

This table lists Taylor Swift's songs, linking them to their albums, and includes details about track numbers, Spotify URIs, popularity ratings, and song lengths in milliseconds.

Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal