Baseball

SQL for Sports Analytics

Sports teams collect data, a ton of it. In order to make this data readily accessible, they usually store it in large structured databases. Data scientists and analysts are able to pull this data by using Structured Query Language (SQL).

If you want a job in sports analytics, you should at least have a basic understanding of SQL. More than likely, you will be working with this skill-set every day on the job.

I put together the following video to help you learn the basics of SQL for data science or sports analytics. In the video we use Microsoft SQL Server to host our database and we use Microsoft SQL Server Management Studio to write our queries. We spin up Lahman’s Baseball database and perform a few of the different types of queries that you would use on the job.

You will learn:

  1. Basic SQL Clauses (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY)
  2. Modifiers
  3. Aggregation
  4. Joins
  5. Subqueries
  6. Views
Ken Jee

Ken is one of the founders of Playing Numbers. He has worked in sports analytics for the last 5 years focusing primarily on golf and basketball. He founded playing numbers to help others learn about the field he loves.

Recent Posts

Sports Analytics & Streaming Data Science on Twitch

In this video, I had the pleasure of speaking with Nick Wan. Nick streams data…

3 years ago

Classifying MLB Hit Outcomes

In 2015, MLB introduced Statcast to all 30 stadiums. This system monitors player and ball movement and…

4 years ago

Data Science in Sports (Talk at Northwestern University)

This past weekend, I was honored to speak to almost 100 Kellogg MBA students about…

4 years ago

Jimmy Graham: A risk worth taking for the Chicago Bears?

Bears fans got a lesson in regression to the mean last season. It may have…

4 years ago

Using ML to Understand Real Madrid’s Poor Last decade in La Liga

Using K-Means Clustering to analyze the types of teams Real Madrid and Barcelona drop points…

4 years ago

Using NCAA Stats to Predict NBA Draft Order

Intro & Lit Review Predicting the NBA draft is always difficult. Should you draft a…

4 years ago

This website uses cookies.