
Updated Database Credentials below (ignore ones on video)
Hi all!
Recently I migrated databases to a new server. Please use the following credentials to connect to the new server.
Host: 82.197.82.63
Username: u479841347_user
Password: LearnSQL123
Database: u479841347_sql_course
Port: 3306
Welcome to the 2nd part of this course! We'll take a deeper dive into working with data for the purposes of data analysis. You're on your way to becoming a data guru!
Profile data types and anomalies in the IMDb movies dataset, inspecting numeric fields, string fields, and currency budgets. Identify nulls vs blanks and multi-country entries to guide accurate aggregations.
Learn to compute averages in SQL by grouping by country, filtering multi-country records with not like, and ordering results by longest average duration.
Compute the average duration by language using group by and having to filter results within a specified range, revealing how films with multiple languages compare.
Summarize durations by director using sum and group by, order results to show the top five directors by total movie minutes, and filter blanks while noting data profiling.
Identify the top five countries by total movie votes by selecting the country field and votes, filtering to single-country entries, and ordering results by votes in descending order.
Explore string manipulation in SQL by using trim, ltrim, and rtrim to remove leading and trailing whitespace, demonstrated on sample strings for clean data.
Explore the substring function in SQL to extract a string piece using a start point and length, with movie titles and data published to extract the month.
Extract the month from date published field using substring starting at the sixth character for two characters, applying it to IMDb movie data and showing months or blanks when missing.
Demonstrate the lower and upper functions in SQL by converting a movie title column to lowercase, comparing results, and prompting practice to convert text to uppercase.
Learn how to apply the upper function to convert text to uppercase, compare with lower, and ensure consistent casing for codes, names, and emails.
Learn how LPAD and RPAD pad strings to a target length using custom characters, left or right, with practical examples for formatted text and reports.
Explore how the reverse function flips text strings in sql, using the title column from IMDb movies and aliasing as reverse_title, with results limited to 100 records.
Learn to use the concat function to stitch together title and year from IMDb movies, creating a readable movie year output and unique keys by combining columns.
Use concat to create descriptive movie stats by combining labels with votes and average votes for clean, report-ready strings.
Learn to isolate the last word of a movie title by extracting the substring after the final space, handling single-word and multi-word titles to produce the last word.
For this lecture, please see the attached solution or check out the YT video: https://youtu.be/pNtjRac87fM
Learn how subqueries encapsulate a query as a temporary table, alias it, and filter results to compute average and max duration by genre (and by language) in SQL.
Build a subquery to compute the average max duration by language, filter to Arabic, and prepare to extend this approach to country and language groupings.
Break down data by multiple dimensions by grouping on country and language, using ordinal group by 1 and 2, to reveal average and maximum movie durations by country-language combinations.
Explore how to compare average movie durations by country for 2005 and 2015 using subqueries and subsets, with filters for blanks and multi-country entries.
Create tables from queries by dropping existing ones and saving results into sandbox tables, enabling easy reference and preparation for later joins.
Learn how case statements in SQL convert raw movie data into labeled categories—short, long, or bring a pillow—using duration and optional else, with aliasing and simple aggregation to support reporting.
Use a case statement to label movies as bad (0–3.9), ok (4–6.9), or good (7–10) based on average_vote, handle not scored, limit results, and validate labels.
Learn how two tables join on a common attribute, using inner, left, and right joins, with set theory ideas of intersection and union guiding overlap concepts.
Compare 2005 and 2015 data using inner join on country, visualizing side-by-side averages of duration, while using union to merge records and explore differences.
Learn how left joins combine a 2015 country table with a 2005 table, showing all records from 2015 and matching data from 2005 while highlighting nonmatching entries.
Explore right joins by comparing 2015 and 2005 country data, revealing records present in the right table but missing from the left, with hands-on comparisons and practical exercises.
Examine and compare movie durations from 2005 to 2015 using joins, aliases, case statements, and aggregation to reveal longer versus shorter trends by country.
Explore subquery joins to compare annual comedy movie votes between the US and France from 2000 to 2015, using average vote as the funniness measure.
Compute the percentage of bad, okay, and good movies in India using a case statement, subqueries, and a cartesian join to derive total and category counts.
This is a continuation of our first course, Beginner's Introduction to SQL and Databases, where we set out to create a foundation for data manipulation and data analysis using SQL. If you are new to data analysis and are looking to work with large volumes of data in an efficient and sophisticated way, this is the course for you!
In this course, we continue complete our SQL education using examples and exercises in:
Data and String Manipulation
String Functions covered such as substring, lpad and rpad, and more that will help you deal with text data
Data Aggregation
We take our aggregations to the next level by introduction GROUP BY
Data Profiling
We cover the importance of data profiling for the purpose of understanding, interpreting and communicating information about your data effectively
Sub Queries
We introduce sub queries and provide a number of scenarios on where to use sub queries
Case Statements
A necessary part of your SQL toolkit, CASE statements enable us to customize our analysis using SQL
Joins
Joins are a very foundational part of data analysis. We cover the different types of joins, provide examples and work through challenging exercises that will help you become comfortable with joins
Are you excited about your future in Analytics, Business Intelligence or Data Analysis! You should be, because after this course you'll have a foundation for success!
-- Update --
Please use the following database credentials to connect. The ones in the video are outdated.
Hi all!
Recently I migrated databases to a new server. Please use the following credentials to connect to the new server.
Host: 82.197.82.63
Username: u479841347_user
Password: LearnSQL123
Database: u479841347_sql_course
Port: 3306