
Supported operating systems for Microsoft SQL Server and SQL Server Management Studio:
Windows 11 (x64)
Windows 10 (x64) version 1607 (10.0.14393) and later versions
Windows Server 2022 (x64)
Windows Server Core 2022 (x64)
Windows Server 2019 (x64)
Windows Server Core 2019 (x64)
Windows Server 2016 (x64) 1
Install the SQL Server Express engine and the SQL Server Management Studio, set up a database instance, and connect via SSMS to prepare for importing NFL data.
Restore the NFL DB backup from the resource, locate the file on device, then open the tables to inspect the NFL data and table relationships in the next lesson.
Review the NFL data schema by exploring database diagrams, understanding table relationships between games, drives, plays, and players, and noting fantasy data and projections.
Explore sql server management studio to run queries and view results, with hands-on practice writing select statements, using top, and exploring game and play tables.
Learn to filter NFL data with where, like, and, or, and in, then order results by week and season year using order by, across game, fantasy data, and play tables.
Explore additional sql queries on nfl fantasy data, filtering by defense and season, counting players above a drafting point threshold, and ranking DK Metcalf's games against the 40 niners.
Group by enables you to summarize fantasy data by player, season, and team, including playoffs, using sum, averages, variances, and counts with regular season filters.
Explore using aggregate functions to analyze NFL data by name, season, and team, computing sum, count, min, max, average, standard deviation, and variance while handling zeros and data type conversion.
Use the having clause after group by to filter aggregated data, such as average DraftKings points above 20, and rank running backs by yards per carry with 50+ attempts.
Explore how to join nfl data across players, teams, games, and drives using inner, left, right, full outer, and cross joins on common fields and table aliases to avoid ambiguity.
Create temp tables with select into, using the pound sign to store 100 combinations. Rename fields for uniqueness, then use insert into to add data and drop tables when done.
Use subqueries to pull in fantasy points PPR projection from season projections and temp tables, aligning running back and wide receiver data to compare top combos for 2023.
Discover how to simplify complex queries with common table expressions (ctes) to build projection data from top combos, compare projection and actual points, and order results by their differences.
Apply the rank function over partition by position to rank players by the sum of fantasy points, grouping by name, position, and team, and filter with having to remove zeros.
Use the coalesce function to replace null draft rounds with 99 for undrafted players, enabling correct ordering and data joins for NFL player data without altering the underlying table.
Compute each team's pass versus run play percentages from the previous season by joining play with game data, then save results to a regular season team stats table.
Pull 2023 NFL player data from the fantasy data table to compute passing, rushing, and receiving totals, touchdowns, fantasy points, games played, and team history by player.
Compute rookie projections by draft round using average fantasy points from fantasy data, joined with player data to capture draft round, rookie year, and regular-season filters.
Combine four data tables to build a unified NFL player dataset, computing age and average fantasy points per game while including rookies through left joins and coalesce for undrafted rounds.
Adjust NFL season projections by importing a CSV into the NFL data analysis database, linking player IDs, and saving the updated projections with proper data type handling.
Course Overview: The "SQL for NFL Data Analysis" course is tailored for individuals interested in gaining practical experience in using SQL to analyze and extract insights from National Football League (NFL) data. The NFL generates a vast amount of data related to games, players, teams, and statistics, making it an ideal dataset for honing your SQL skills. Whether you're an aspiring sports analyst, a data enthusiast, or a football fan, this course will equip you with the tools to delve into the world of NFL data and uncover valuable insights.
Course Objectives:
Understand the structure and sources of NFL data.
Learn SQL syntax and commands for querying NFL data.
Develop the ability to formulate SQL queries to answer specific NFL-related questions.
Gain hands-on experience with real NFL datasets.
Explore advanced SQL techniques for complex data analysis.
Create data visualizations to communicate your findings effectively.
Course Outline:
Module 1: Introduction to NFL Data
Overview of NFL data sources
Understanding the NFL data schema
Installing and setting up the database
Module 2: Basic SQL for Data Retrieval
SELECT statements for retrieving NFL data
Filtering data with WHERE clauses
Sorting and grouping results
Module 3: Aggregating NFL Data
Grouping Results
Using Aggregate functions - SUM, AVG, MAX, MIN
Filtering aggregated data with HAVING
Module 4: Joins and Relationships
Using JOIN operations to combine data
Creating new tables with SELECT INTO
Using Sub Queries to pull additional information
Common Table Expressions (CTE) for complex queries
Module 5: Advanced SQL Techniques
Window functions for ranking and partitioning data
Handling missing or incomplete data
Module 6: Creating Your Own Projections for a New Season
Pulling play and player data from the previous season
Dealing with Rookie projections in your dataset
Combining datasets
Adjusting and saving datasets
The "SQL for NFL Data Analysis" course is designed to provide you with the practical skills and knowledge needed to explore and analyze NFL data using SQL. By the end of the course, you'll be equipped to extract valuable insights from the rich world of NFL statistics and contribute to the field of sports analytics.
Supported operating systems for Microsoft SQL Server and SQL Server Management Studio:
Windows 11 (x64)
Windows 10 (x64) version 1607 (10.0.14393) and later versions
Windows Server 2022 (x64)
Windows Server Core 2022 (x64)
Windows Server 2019 (x64)
Windows Server Core 2019 (x64)
Windows Server 2016 (x64) 1