r/learnSQL • u/Exact_Engineering773 • Aug 01 '26
What's the best method to learning SQL?
I'm looking at a SQL learn book but it's really boring. I already know python r sas, so I just wonder, maybe it would be better to see people's work instead of reading a 300 page book?
56
Upvotes
11
u/conor-robertson Aug 01 '26
I wouldn’t force myself through a 300-page book if it’s already putting you off. SQL usually clicks much faster when you’re actually writing queries and solving problems.
Since you already know Python, R and SAS, I’d learn the core SQL concepts quickly, then spend most of your time practising on realistic datasets. Looking at other people’s queries can help, but try to write your own solution first so you don’t fall into passive learning.
I’d recommend giving QueryCase a try as well. It teaches SQL through detective-style investigations and business scenarios, so it feels much less like reading documentation and more like solving an actual problem.
The main thing is repetition: write SQL regularly, revisit problems you struggled with, and focus on understanding why a query works rather than memorising syntax.
6
u/BearRootCrusher Aug 01 '26
You learn by doing.
Use your SQL Book and AI as reference and assistant.
Solve SQL problems on https://sqlrusher.com
SQL Rusher is something I built for how I like to learn.
It’s a collection of different sample datasets and tons of practice questions with different levels of difficulty.
There is Rush a game you play where you are given a simple SQL puzzle and 5 minutes to submit the right query.
If you solve the puzzle you’ll move to the next level of difficulty.
3 strikes your out on a Rush. If you’ve ever played on chess.com they have a game called puzzle rush. This is the same thing but for SQL.
I’ve also added a Drill section where you can pick difficulty levels to practice or key tags.
I recently added SQLings that try’s to emulate what they did for Rust called Rustlings! Simple puzzles to learn SQL.
2
u/Independent-Bag6544 Aug 01 '26
Work. Get into a db and work
2
u/Dry-Solid-7438 Aug 01 '26
Doing it.
2
u/tamanikarim Aug 02 '26
Like anything else, you learn by doing it.
Start by building a project. Try to come up with an idea and build it. You can start by designing your database. You'll learn how to analyze requirements and turn them into tables, columns, relationships, and constraints. You can use free tools like StackRender for this part.
Then, when you jump into the backend, you'll learn how to perform database queries (INSERT, SELECT, ...). As your project grows and you want to add more features, you'll also need to learn database migrations and how to move your database from one version to another.
So, as you can see, you just need to throw yourself into it. You'll fail, break your database a hundred times, fix it, and repeat. That's how you gain experience, more than any textbook can teach you.
3
u/datadriven_io Aug 01 '26
Hit up the "learn" tab here, if you're just getting familiar with SQL: https://datadriven.io/learn
Once you feel more comfortable, work through the interview patterns lessons, then eventually move towards solving interview-level SQL problems: https://datadriven.io/problems?domain=sql
1
u/powderviolence Aug 04 '26
https://www.ed2go.com/courses/computer-science/programming/ilc/sql-series
This was nice, structure is a breeze and you can print-to-pdf whole sections for future reference.
1
u/callmemerryss Aug 14 '26
Books are useful as reference but SQL tends to stick once there's a reason to write queries. Looking at other people's code can help, but trying to solve the first usually teaches more. sqlbolt, datalemur, and boot.dev are all worth a look if interactive practice is more motivating than reading.
0
u/TurbulentCountry5901 Aug 01 '26
The best free resource to learn sql: SQL Case FIles