When football season started up and as my fantasy draft timer was counting down, I was scrambling to find the stats I needed to decided which running back I should pick in the third round.
I wondered if I had the data sets myself so I could build my own queries and do my own analysis. Could I be the next Billy Bean or Daryl Morey? Probably not. At the very least, it'll give me great practice with building SQL queries and data preparation.
A lot of the sports stats available online are embedded to the website or will cost you some kind of subscription to get a copy of. However, if you want the practice and just to test out some ideas, SportsDB.org has a sample database schema with stats from professional football, basketball, baseball, and much more.
You can download the data as a MySQL or PostgreSQL script, or as a SQL Server database log.
I'll show you how you can take the MySQL file and place it into Toad Data Point Professional Edition includes a Local Storage that supports MySQL scripts, so you can load it. So you won't even need to set up a database to get started because Toad Data Point includes one.
Visit sportsdb.org and download the Sample MySQL script file. Unzip it to your local computer.
Go into your Toad Data Point and connect to your local storage. (You will need professional edition of Toad Data Point) Create a new database, called "Sports"
Now open up an editor window by clicking on Editor. Then open the .SQL file from the zip you downloaded into the Editor. It's a fairly large file, so it may take a minute to open. Make sure the "Sports" database is selected in the Editor's drop down.
Click the run button and let it rip. Should take about a minute on a modern PC.
Now you have a Sports Database you can play with. Done! Without a call to your IT Helpdesk.
You can link tables together in the Query Builder using the ID column. You can also check out this page for a ER Diagram of the entire database to learn more about it.
Here's a simple query of players names and their rushing stats. Visit www.toadworld.com/products/toad-data-point to learn more about Toad Data Point and how to query data like this using a drag and drop approach.
This is a sports standard so whatever you come up with you can apply to the data sets out there if you get a subscription to one. Have fun and good luck!