r/SQL • u/Then-Macaroon9958 • 6h ago
Discussion How to progress with SQL?
I’ve been writing SQL daily at work for about 2–3 years (mostly Redshift, risk/analytics). Like a lot of people, I learned it on the job: figure out what the business needs, google my way through it, use Claude, repeat. It’s gotten me pretty far, but lately I’ve felt like I’ve plateaued.
The problem is I don’t know what I don’t know. My queries work, but I have no real benchmark for whether they’re good, and nobody’s ever really challenged how I approach problems or poked hole in the logic. I’ve done some self-paced stuff (Udemy, practice problems), and it’s fine for learning syntax, but it doesn’t tell me where my blind spots are.
So I’ve been thinking about finding an actual person to learn from, either a tutor or an instructor-led course where someone reviews your work and pushes back. I’m in the Burlington/Hamilton area, so in-person is an option, but live online works too.
For anyone who’s been in a similar spot: Did working with a tutor or instructor actually make a difference, or did you find another way to level up? If it worked, how did you find the right person or course for someone who’s past the beginner stage?
Would really appreciate hearing what worked (or didn’t) for you and how you got over this feeling of hitting a wall.
5
u/rando1-6180 6h ago
I was you 15+ years age, pre-AI. I came across a book from O'Reilly: SQL Cookbook by Anthony M. It was a game changer for me. It starts simple (just like SQL), but gets into all sorts of advanced topics including gaps and islands. I actually used that concept at work for a client. There is some amazing stuff you can do in SQL. The additions of window functions, lateral joins and such just opened up a world of possibilities for me.
GitHub has a repo with source files from the book. I just found a post about the book: https://www.reddit.com/r/learnSQL/s/87oDv3xwuk
Hit this up first. Maybe throw it into your AI and ask it to improve some of your existing queries and explain the changes?
Best of luck!
4
u/Available_Safe1818 6h ago
Do try doing things with CTEs and window functions and other stuff, to see if any of it helps reduce the query size or the number of queries that need to run?
2
u/ArielCoding 4h ago
You’re not missing more SQL lessons, you’re missing feedback, try running EXPLAIN on your slowest queries to see where Redshift struggles, then rewrite them and check whether they get faster.
1
u/Hour-Measurement-835 5h ago
Redshift already grades your queries. STL_ALERT_EVENT_LOG logs a row when the planner spots trouble in one, like a nested loop or missing stats, with a solution column. Whether Serverless has it I don't know.
1
u/ceeej777 5h ago
Find a way to profile the queries? There should be a way to figure out rows scanned, CPU usage or some sort of benchmark. A tutor for SQL when hardly any engineers are writing code by hand seems a bit overkill. But i do wonder if one day people will start to revisit the AI generated code to see if there are inefficiencies. Im writing almost all queries through Genie Agents in Databricks so not a lot of hand written SQL on my end
1
u/Candid_Recover3783 3h ago
What got me past that wall was reading EXPLAIN plans on my own quiries
1
u/sung-keith 2h ago
Think of it on a language perspective.
You know the language, you get by, everything's fine.
So, using the language is not the problem. Because you know how to use it.
The problem is the quality of problems that you are solving :)
You want not only harder problems but also interesting problems in SQL :)
Try the SQL 50 of Leetcode :)
Also, Redshift's SQL version is very old. When you use other datawarehouses, like Snowflake, they have other features like QUALIFY.
Look for harder problems to try :)
Also, SQL has different types of commands. You might be just using DQL. There are also other types like DML.
You'd learn more about it when you start to think about ETL pipelines.
1
u/my-ka 2h ago
sql-ex.com
0
u/theWawacoffee22 6h ago
I was in that exact rut a few years ago, daily SQL for reporting but zero feedback loop. The thing that cracked it for me wasn't a tutor, it was finding a coworker from another team who actually knew their stuff and asking them to tear apart my longest query over coffee. Watching them rewrite a 200-line monster into 40 lines with window functions I'd never touched was humbling but eye-opening.
What you're describing is less about syntax and more about thinking in sets versus row-by-row logic, and that shift is hard to make alone. If you can't find someone internally, I'd look for a mentor on the SQL Discord servers or even LinkedIn, plenty of senior data folks enjoy doing code reviews for people who are clearly past the beginner stage and just need their assumptions challenged.
Paid tutors felt hit or miss when I looked into it, mostly because they're geared toward people learning joins for the first time. The few that weren't charged consulting rates that made my eyes water. Might be worth it if you find someone who specializes in query optimization on columnar databases though, since Redshift has its own quirks that generic SQL advice won't cover.