A Roadmap for Learning SQL
Tags: code, sql, learning, career
Published: 2021-12-07 04:17:18

---
title: A Roadmap for Learning SQL
published: true
date: 2021-12-02 13:20:00 UTC
tags: code,sql,learning,career
canonical_url: https://x-team.com/blog/learning-sql-roadmap/
---

 ![A Roadmap for Learning SQL](https://res.cloudinary.com/dukp6c7f7/image/upload/f_auto,fl_lossy,q_auto/s3-ghost//2021/12/SQL.jpg)

Structured Query Language, better known as SQL, is a programming language for interacting with relational databases. The language was modeled after the ideas in Edgar F. Codd's 1970 paper [_A relational model of data for large shared data banks_](https://dl.acm.org/doi/10.1145/362384.362685) and commercially released for the first time in 1979_._

Despite having been around for over forty years, SQL is still by far the most popular query language. If you interact with data of any kind, want to raise your value in the job market, or are tired of using VLOOKUP in Excel, it is well worth learning SQL.

SQL isn't hard to learn either. Even if you don't know any other programming languages, it won't take long to gain a decent understanding of SQL. However, there is a way to go about it. This article will explain how you can best learn SQL to go from beginner to expert.

_Disclaimer: SQL is different from MySQL, SQL Server, PostgreSQL, and other variations. The latter are all relational database management systems (RDBMS) that allow you to keep the data in a database organized. Think of them as dialects of SQL. Once you know SQL, learning any of these RDBMS is relatively easy._

## The Best Way to Learn SQL

### Start Simple

The best way to get started is to get the basics down as quickly as you can. You need to understand basic SQL syntax, which means learning functions like `select`, `from`, `where`, `group by`, etc. You also need to learn how to write a proper query. All this can be done rapidly and for free in one of the following courses:

- [DataCamp Introduction to SQL](https://www.datacamp.com/courses/introduction-to-sql)
- [W3Schools SQL Tutorial](https://www.w3schools.com/sql/default.asp)
- [Codecademy Learn SQL](https://www.codecademy.com/learn/learn-sql)
- [Khan Academy Intro to SQL](https://www.khanacademy.org/computing/computer-programming/sql)
- [Select Star SQL](https://selectstarsql.com/)

### Solve SQL Problems

Once you have the basics down, it's time to solve SQL problems. The more you practice, the better you'll get! There are many excellent, free websites with problems that are easy, intermediate, and advanced:

- [HackerRank SQL](https://www.hackerrank.com/domains/sql)
- [SQLZOO](https://sqlzoo.net/wiki/SQL_Tutorial)
- [Schemaverse](https://schemaverse.com/) (gamified)
- [GalaXQL](http://sol.gfxile.net/galaxql.html) (interactive)
- [Advanced SQL Puzzles](https://advancedsqlpuzzles.com/)
- [SQLPad](https://sqlpad.io/)
- [Data Analyst SQL Interview Questions](https://quip.com/2gwZArKuWk7W)

### Practice with Real Data

Once you know the basics and feel like you can solve complicated SQL problems, it's time for a reality check. You can solve all the online SQL problems you like and still not be prepared for the real world. You need to steel yourself for duplicates, incorrect data, siloed data, poor database performance, a high noise-to-signal ratio, and worse.

{% twitter 1252291581320757249 %}

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

One of the best ways to prepare yourself for such problems is by using real data and creating your own problems. This can be great fun, because there are so many databases that you can almost certainly find data on a topic you're passionate about. For example:

- Love US politics and sport? Use [a FiveThirtyEight dataset](https://data.fivethirtyeight.com/).
- Love movies? Use [an IMDb dataset](https://www.imdb.com/interfaces/).
- Love streaming? Use [a Kaggle dataset](https://www.kaggle.com/aayushmishra1512/twitchdata).
- Love climate? Use [the European climate dataset](https://www.ecad.eu/).
- Love something else? Check out [this massive list of public datasets](https://github.com/awesomedata/awesome-public-datasets).

### Learn Database Theory

If you really want to master SQL, you need to know more than just the language and its variations. You need to learn about databases themselves. True SQL experts learn about relational design theory, relational algebra, unified modeling language, and beyond. A good start in that direction is the [free Stanford series on databases](https://www.edx.org/search?q=stanford%20databases&tab=course).

## In Conclusion

Learn SQL basics, solve problems, practice with live data, and learn database theory. That's the trajectory if you want to go from knowing nothing about SQL to becoming an SQL expert. All this can be done at your own pace and without spending a penny. Good luck!