21 of the best free resources to learn SQL

I self-taught myself SQL after I bombed a technical interview that involved SQL. It got me a bit mad at myself, so I went ahead and started looking for different resources to help me practice and learn SQL. I wasn’t looking to spend any money so I focused on getting the best free resources. The list below is the fruit of my efforts. I hope that it helps you on your journey to learn SQL.

It can be handy to learn SQL. You might be looking to do data analysis with it, or you might look to learn SQL to help answer different questions you have on your data. A quarter of data users use MySQL databases — to get access, you’ll need to learn SQL.


1- Codeacademy

Codeacademy is one of my go-to resources for learning programming because it involves interactive exercises where you get immediate feedback. This is what makes the practice and learning of programming so fluid and rapid. Their section on SQL meets the same bar as the rest of their courses, and of course, it’s free.

Learn SQL

Source: author screenshot

2- Stanford Databases Mini-Course

This free self-paced mini-lesson on databases and SQL allows you to follow along with what top computer science students at Stanford are learning — all this at a self-directed pace, and for the total cost of zero dollars.

3- Head-First SQL (O’Reilly)

This book by O’Reilly entitled SQL Head First helps you dive deep into SQL topics, with tons of examples and writing to help you learn SQL. It can be completely free with a free trial of their Safari product (though the trial will run out). I classified it as a free resource as it doesn’t seem like O’Reilly’s paywalled it.

4- SQL Tutorial – W3Schools

W3Schools offers a text + exercises tutorial that breaks down individual SQL functions. I like looking through individual-level examples of different functions, especially when I’ve forgotten the nuances of one or another. You’ll see that several other providers do the same thing as W3Schools, but for me, W3 is the best resource out of the lot.

5- SQLZoo

SQLZoo is one of the coolest free SQL resources out there. The set of rich, interactive exercises placed in real-world settings is about as close as you’ll get to working with SQL in complex production-level environments without actually being hired. I used it a lot to practice SQL as I was picking up data analysis skills and I still use it every once in a while as a refresher.

learn sql

Source: Author screenshot

6- Mode Analytics

Mode Analytics offers a cool, intuitive interface along with a case study like approach involving Crunchbase data. It can help you rapidly place your SQL skills in a context that is like real-world uses, and once again, it’s free. They’re trying to upsell you to their paid product in offering this educational resource. That type of content always does well however, because it’s never priced and the focus of the team in question is to deliver maximum quality and substance for your learning objectives.

7- Sololearn 

This Sololearn course is interesting because it has different quizzes to make sure you retain material as you’re learning it. It follows the same conventional structure of teaching you how to select and query data, then teaching you how to sort and manipulate it within a data table, finally moving to joining and modifying tables. Notably, there isn’t much here in the way of aggregation functions or subqueries, which other courses above will teach.

8- SQL for Beginners (Youtube)

If you prefer learning with video content, this 1-hour video tutorial on SQL might just do the trick for you. It starts going over the basics of SQL, then shifts into the end by talking through different functions and examples on video. It is however meant to be an introduction — don’t expect to become an expert in SQL just by watching this video.

9- SQL Tutorial

SQL Tutorial offers an interface like W3Schools without the exercises. In case none of the resources above it seem to be working for you, this is another free resource where you can break down and learn SQL functions one-by-one.

10- SQLCourse

SQLCourse offers a curriculum with specific exercises for different functions. It is another handy way to practice your SQL skills for free. The interface is a bit janky, but it’s workable.

11- Welcome to SQL (KhanAcademy)

If you prefer a set of curated video tutorials that cover different topics, then look no further than the KhanAcademy course that introduces SQL. It runs through to the basics until aggregating data — there are projects in between as well. If you’re already on KhanAcademy, this could be a perfect transition to you learning SQL.

learn sql

Source: author screenshot

12-TutorialsPoint

Yet another text + examples format of teaching SQL, TutorialsPoint does offer more of the same: but if you’re looking for more and more practice or different ways to digest SQL material, it might be handy enough for you.

13- SQLBolt 

SQLBolt is constructed a bit like a virtual, interactive book on SQL. You can read through it and then go through each exercise, feeling like you’re being guided on your journey by the book-like structure. If you want a more focused and curated approach to learning SQL — this might be it for you.

 

14- Galaxql

Another interactive SQL course, meant to run in the browser. It’s free-to-use, but may use quite a few intensive resources as it’s running. (not sure if that’s just how old this tutorial is, or an honest warning). It is free to try if you want to take a look.

15- Use the Index 

Use the Index is a very useful advanced training site for SQL. Once you have the basics down, check out this site to see how to optimize your SQL databases and your queries so you can get maximum performance from it.

learn sql

Source: Author screenshot

16 – Schemaverse 

Schemaverse is a game built entirely on SQL. I’m a big fan of using gaming to motivate people to learn. I think it could show an exponential effect on motivation and on acquiring SQL skills if you’re somebody who wants to learn, but might get bored out of their mind with conventional tutorials or videos.

17- SQL Server Microsoft Documentation

The Microsoft documentation around SQL Server can help you understand how to use their software to manage SQL databases and tables — it’s offered for free, so you can take advantage and have a look even if you’re just curious.

18- SQLFiddle

SQLFiddle allows you to upload data and play around with different SQL queries to see what data comes back. It is a great way to practice your SQL skills, especially if you don’t have a real-world database to play with. You can take .sql files from elsewhere, upload them, and then try to manipulate the data contained within or query certain selections of data. It is also free to use — which never hurts.

19- MySQL Sandbox

MySQL sandbox allows you to install several MySQL servers in sandbox mode, allowing you to rapidly experiment, test and learn with different data files. It can be a useful way for you to practice what you can do with multiple SQL instances.

20- Stack Overflow (SQL) 

One of my favorite free resources to learn SQL or really any programming language is StackOverflow. This is an online Q&A community focused on technical topics where you can ask experts questions or see solutions to existing problems. It’s a fantastic community to immerse yourself in if you’re learning SQL. The specific SQL tag makes sure that you can stay focused on SQL topics.

learn sql

Source: author screenshot

21- r/LearnSQL (Reddit)

Another great community for learning is Reddit — where you can see different resources being placed and ranked by users as the days go by. Take part in discussions here or take advantage of articles or discussions posted to spur your own learning exponentially forward.


Hopefully, all these free resources are helpful to you on your journey to learn SQL — they were helpful to me as I started learning. While I leaned on some a bit more than others, I’m always a big fan of curating as many resources as possible because my learning style (very text-heavy) may not be the same as yours.

A lot of research has been done on the predictive abilities of matching how a concept is presented with a preferred learning style. While few models meet the test, it does seem like digesting new materials under a whole bunch of different modes or media formats helps learning.

So if you want to learn SQL, it’s best to go through and try a few of these resources, then choosing and sticking to which ones you like and combating the learning problem from many different angles.  

[ssba]

The author

Roger is an entrepreneur who has co-founded a social network entitled ThoughtBasin that looks to connect students looking to make a difference with organizations looking for difference makers. This experience has given him some setbacks, but also some priceless insights. He is deferring admission from the law school of University of Toronto to pursue his dream of creating impact through entrepreneurship, and he is constantly looking to learn and create, and to do more. He contributes to social entrepreneurship projects with his fellow Global Shapers, coordinates a volunteer tutoring site, and on his off time he unwinds by reading, writing, and dancing---sometimes, all at the same time. Follow him on Twitter at https://twitter.com/Rogerh1991.