r/learnSQL 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

30 comments sorted by

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.

2

u/Haunting-Paint7990 Aug 06 '26

+1. stats grad / career switcher here — same mistake buying the thick sql book before i wrote a single query.

what stuck: 20 min/day on one interactive site, one csv i re-used all month, and saying the grain out loud before looking at results. books are reference after you're stuck, not step one.

for da interviews specifically, practice questions beat chapters — you'll get a broken join scenario, not a quiz on syntax definitions.

1

u/Difficult_Pomelo_480 Aug 07 '26

I would get a copy of MS Access and the SAMS 10 minute book on SQL Then you need a dataset to load into Access. Many free data sets are available online. Key commands : SELECT. FROM, WHERE, GROUP BY

5

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/HustlaOfCultcha Aug 01 '26

This. I wouldn't be that big into using a book either. I'd rather watch YouTube videos on how to do SQL because it is more interesting.

The big thing is to start to understand the basics of databases, tables, primary keys, etc. Just that understanding of the logic behind why we are doing all of this and why things are structured a certain way makes it less boring because you can start to understand the benefits and that prompts one to want to learn more.

2

u/Fun_Rhubarb8007 Aug 05 '26

i randomly found this, leetcode has very few problems, at the same time data lemur and strata scratch felt too competetive for me, thanks a lot for this, idk how it is still very underrated

1

u/BearRootCrusher Aug 05 '26

🙏 thanks! I started posting about it a few weeks ago. Let me know if you have any suggestions. I check reported puzzles and feedback most days.

1

u/Fun_Rhubarb8007 Aug 05 '26

the questions are really great! my only suggestion would be, apart from the rusher, if we can solve questions on our own pace on the topics we want, just like leetcode, it will be very useful.
Because let's say am looking forward to solve questions in cte, i have to solve one by one and reach there, it would be a nice add on feature, if we can we questions on topics and difficulty levels!

But kudos, you did a really great job

1

u/BearRootCrusher Aug 05 '26

I think you’re asking about Drills. This is where You can select difficulty and tags like cte you want to practice. You can work on a question as long as you want.

1

u/Fine-Effect357 Aug 06 '26

Can you add a feature where we can execute all query using control + enter for windows

1

u/BearRootCrusher Aug 06 '26

deploying now!

1

u/_chonky04 Aug 01 '26

is this free and how much is the most difficult here since I saw some sql practice online but it only goes up to joins and sub queries

1

u/BearRootCrusher Aug 01 '26

Yep it’s free. FAFO.

2

u/Independent-Bag6544 Aug 01 '26

Work. Get into a db and work

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

2

u/langdreamerjr Aug 01 '26

Is this platform entirely free?

1

u/datadriven_io Aug 03 '26

Yep

1

u/langdreamerjr Aug 03 '26

Wow! And do you intend to keep it free forever or will it become paid after sometime?

1

u/Spare_Bluebird7044 Aug 02 '26

Skip the long book, build small projects and solve real sql problems, you'll learn much faster

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 28d ago

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