When folks are learning SQL, one of the most important things we can do for them is set them up with a solid roadmap that will help them tackle important concepts in the right order.
In this article, we'll share a great plan for learning SQL if you're new and want to start developing your skills.
Step 1. Understand what SQL is and how we use it
This quick video should serve as a great primer for you:
Step 2. Download some free SQL tools
If you've already got a SQL tool installed on your machine, just use that and you can skip this step. It's okay if it's not MySQL (what we use at Maven). All of the SQL flavors are extremely similar. There's no wrong choice here. The key is to just get moving.
If you are starting from scratch, these MySQL tools are powerful, free, and easy to get installed.
We use them to teach our SQL courses at Maven, plus tons of companies use MySQL on the job.
Step 3. Get access to a database to start practicing
The best option here is to get access to your database at work. If that's a possibility, I would highly encourage you to do that, and then start using SQL to pull some data that's related to your role. The absolute best way to learn is by practicing with real world scenarios that make sense to you in the context of your business.
If your company won't give you access to a database to pull data that's relevant to your role (again, try this first) then you'll need to get access to a live database elsewhere.
Here are a couple of solid options for practice databases:
MySQL Data Analysis course. If you're already subscribed to the Maven Analytics unlimited access membership, then take our this course. It's built for beginners so we teach from the ground up. Plus, it comes with a great database you can practice with.
If you're not a Maven Analytics member, and feel comfortable going through some trial and error on your own, you can grab sample databases from MySQL:
Step 4. Get your hands dirty, starting with the Big 6 of SQL querying
Now, this is where the magic starts to happen.
You're about to start writing SQL queries!
It's at this stage you'll start to see that SQL really isn't that bad. It's an intuitive language that anyone can learn. And it can be pretty fun when you realize how easy it is to start pulling information out of a database.
Note: this is the point in my roadmap where I sometimes get roasted by "academics". They fly in and say I'm crazy to just throw you into query writing. They say the first stop should always be teaching foundational theory and explaining what relational databases are, how tables relate, proper data model structure, etc, etc. This was also the subject of a pretty hilarious 50+ comment TikTok argument on one of my videos between an academic and someone who lives in the real world like me. It was pretty funny, but I unfortunately can't find the link.
I do appreciate their good intentions, but here's my take...
My goal is to get you to the moment where you realize you can do this, and that it can be fun, quickly, in the simplest possible way.
After that, the lightbulb has gone off. The momentum starts to build. You see the value of SQL. You're having fun. You are hungry for more. Then we build on this progress, and yes, eventually we do want to cover relational database theory and data model best practices. We just want to do that at the optimal time for our learners, to maximize the probability of success.
If I took the academic route, and buried you in theory and complex technical concepts (that frankly you might not really need often on the job) you may get bored or overwhelmed before you ever fall in love.
So, I always get you writing queries on day 1 :)
Your first stop is to focus on the Big 6 of SQL Querying.
SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY
You'll use these 6 statements and clauses to pull data from individual tables in the database (joining multiple tables will come later).
This is where you'll see that SELECTing data FROM a specific table is just as easy as using a SELECT and a FROM in your code... pretty intuitive!
If you're a Maven Analytics unlimited access member, you've already got our MySQL Data Analysis course at your fingertips. The Big 6 will be your first stop there.
If you want to go it on your own, I'd recommend using dev.mysql.com documentation, which is fantastic. Just Google 'dev.mysql' and then thing you want to read about, for example, a Google search for dev.mysql.com SELECT will get you to this top result:
dev.mysql.com SELECT statement
Repeat this and practice with your sample database until you feel confident you understand the Big 6 and when and how to use them.
These 6 concepts will be your SQL foundation.
Step 5. Learn aggregate functions, and use them with GROUP BY to slice and dice your data
If you're familiar with pivot tables in Excel, the concept of creating groups and summarizing those groups with key metrics will be familiar.
This is exactly what you'll be doing with aggregate functions in SQL, and you can slice and dice your data into groups with GROUP BY.
Here are the aggregate functions you should learn to use.
COUNT( )
SUM( )
AVG( )
MIN( )
MAX( )
Again, we'll cover these in our MySQL Data Analysis course, or you can turn to Google and read up. Just search 'dev.mysql.com COUNT', etc.
Step 6. Learn some relational database theory - database design, table relationships, data types, etc.
Here are the concepts you'll want to focus on here:
Primary and Foreign Key Mapping
Cardinality
Normalization
Data Types
Again, we'll take you through each of these concepts with our MySQL Data Analysis course, or you can turn to Google.
If you're going it on your own, I do want to point you to a fantastic resouce to use in understanding data types:
Step 7. Practice querying data from multiple tables
Here are the concepts I would recommend focusing on:
INNER JOIN
LEFT JOIN
UNION
And yes, there are some other join types you should understand for completeness. But you'll use the three above for 95% of your needs. I've never seen a RIGHT JOIN used in code on the job, and CROSS JOINs and FULL OUTER JOINs are used pretty infrequently.
Again, if you're an Unlimited Access Maven Analytics subscriber, you've got access to these topics already in our MySQL Data Analysis course. If you want to tackle these concepts on your own, Google 'dev.mysql.com INNER JOIN' etc and start practicing on your own sample database.
Step 8. Learn how to create your own schemas and tables
These are tasks typically reserves for DBAs and Data Engineers, but knowing how to do these things can also make you a stronger and more flexible Analyst. And they certainly help you understand how databases work at a deeper level.
Here are the first concepts I would recommend you cover:
CREATE SCHEMA
CREATE TABLE
ALTER TABLE
DROP TABLE
INSERT
UPDATE
DELETE
This last group of concepts is covered in our MySQL Database Administration course, which you'll have access to if you're a Maven Analytics subscriber.
And again, Google will get you to some great documentation by searching 'dev.mysql.com CREATE SCHEMA' etc.
Step 9. Set reasonable expectations
This roadmap is meant to help you build a foundation in SQL.
Is this everything anyone would ever want to learn about SQL? No, there is a lot more you can learn :)
But it's a really solid starting point, and gives you a flow where you can learn the topics in a logical order that will make sense to you and help you start building some momentum.
Plan on getting a jumpstart here, and then moving on to more advanced concepts like CTEs/temp tables/subqueries, window functions, automation with triggers and scheduled events, etc. Learning SQL is a lifelong endeavor :)
Hope you found this helpful and I hope you'll use it to make progress and learn a valuable skill that you can keep with you for your entire career.
BLACK FRIDAY CAME EARLY!
Save up to 50% on Maven Pro plans today!
This week, we're offering up major discounts on individual subscriptions at Maven Analytics. Don't wait -- this offer ends soon!
John Pauler
Partner, CGO. & Lead SQL Instructor
John brings over 15 years of business intelligence experience to the Maven team, having worked with companies ranging from Fortune 500 to early-stage startups. As a MySQL expert, he has played leadership roles across analytics, marketing, SaaS and product teams.