Using the COUNT Function for Quantitative Analysis
Introduction
In this 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 movies or characters in a table. The COUNT function in SQL is crucial for summarizing data, allowing you to count rows in a table based on certain criteria. Let's get started.
Dataset Overview
In the previous course, we used a simplified Marvel movies dataset in the lessons, and used an expanded dataset in the practice tasks. In this lesson, we will switch to using the expanded dataset in the lesson. Let's take a look!
Movies Table
The movies table includes the first 33 Marvel movies. Each entry in the table includes a value for movie_id, movie_name, release_date and phase. The movie_id column corresponds to the movie_id column in the movie_details and characters tables.
Movie Details Table
The movie_details table includes details for the first 33 Marvel movies. Each entry in the table includes a value for movie_id, budget_million_usd, box_office_million_usd, imdb_rating, and runtime_minutes. The movie_id column corresponds to the movie_id columns in the movies and characters table.
Characters Table
The characters table contains 243 entries for characters that appear in the first 33 Marvel movies. Each entry has a character_id, movie_id, character_name, actor, and screen_time_minutes. The movie_id column corresponds with the movie_id column from the movies and movie_details table.
