This content originally appeared on DEV Community and was authored by Sonali Suri
All views in this post are my own and do not represent any company, employer, or organization I’m affiliated with. This is a personal take on learning SQL.
When I first started learning SQL, I thought it would be easy.
I mean, it uses real English words like SELECT
, FROM
, and WHERE
.
How hard could it be?
Well… turns out it can be pretty confusing. And if you’ve ever stared at a SQL query thinking “Why doesn’t this make any sense?”, you’re not alone.
Let’s break down why SQL feels weird, and more importantly, how to finally get comfortable with it.
Why SQL Feels So Weird
1. It’s not like regular code
Most programming languages are step-by-step (aka procedural).
SQL is declarative — you describe what you want, not how to do it.
It’s like ordering food at a restaurant:
You say what dish you want, not how to make it.
That shift in thinking takes time.
2. Joins are sneaky tricky
Ever done a JOIN
and ended up with 10,000 rows instead of 10?
Yeah, same.
Joins connect tables based on matching values, but one small mistake and your result becomes a mess of duplicates or empty rows.
3. Error messages are cryptic
SQL doesn’t really help you debug.
It’ll say something like:
ERROR: invalid identifier
And you’re left wondering what went wrong where. It’s like a database shrug.
4. SQL doesn’t run top to bottom
Here’s a weird thing: even though you write this:
SELECT name FROM users WHERE age > 30;
…it actually runs in this order:
-
FROM
-
WHERE
-
GROUP BY
-
HAVING
-
SELECT
ORDER BY
Once I learned that, everything started making more sense.
How to Actually Get Better at SQL
1. Use data you care about
Don’t just practice on “employee” tables.
Use data you like—like movies, books, games, Spotify playlists.
When the data is fun, writing queries feels way less boring.
2. Write the query in plain English first
Before typing any SQL, just write out what you want in your own words:
“I want a list of users who signed up in the last 30 days.”
Then build it line by line.
3. Use free sandboxes to practice
No setup needed. Just open and query:
4. Learn the actual execution order
This is huge.
Once you know how SQL actually runs your query, you’ll understand why stuff breaks—and how to fix it.
5. Draw it out
If you’re stuck on joins or multi-table queries, draw a quick diagram.
Even just boxes and lines can help you visualize how data is connected.
Final Thoughts
SQL is different. It’s not always beginner-friendly. But it’s not impossible either.
Once I stopped treating it like a “normal” programming language and started thinking in data logic, it clicked.
So if you’re struggling:
Be patient.
Google stuff.
Break big queries into small ones.
And don’t give up.
Even the best developers once messed up a JOIN
and got a million duplicate rows.
This content originally appeared on DEV Community and was authored by Sonali Suri