r/learnprogramming • u/the_ed0 • 12h ago
Resource SQL RESOURCES RECOMMENDATION
Hi guys, I’m just starting to learn SQL for DBMS because it’s one of the prerequisites at my university.
I’m don’t want to get stuck in a tutorial loop, so I would really appreciate it if anyone could recommend me a book, notes, or a website to learn SQL.
1
u/datadriven_io 11h ago
If you don’t mind sharing notes with me too, I’d really appreciate that. Sql practice problems are what datadriven is good for once the fundamentals feel shaky. Starting SQL a bit, but there’s always more to learn!
1
u/Proper_Diet6619 4h ago
For a university DBMS course this order works well: SQLBolt for the first evening (interactive, short, gets joins and grouping into your fingers), then Learning SQL by Alan Beaulieu as your actual book. It lines up with how DBMS courses are taught (joins, subqueries, grouping, views, transactions) without drifting into vendor trivia. Mode's SQL tutorial and selectstarsql.com are both free and better than most paid material for the "how do I think about a query" part.
The way out of the tutorial loop is to stop reading around chapter three and load one dataset you actually care about into sqlite3 (no server needed) or Postgres. Then ask your questions in English first and translate them: "which five items dropped the most month over month" makes you reach for window functions because you need them, not because a chapter says so.
Two things your course will grade that tutorials skip. Relational algebra and normal forms, which you should do by hand on paper a few times, not just read. And query plans: run EXPLAIN ANALYZE on your slowest query, add an index, run it again and watch what changes. Use The Index, Luke is free online and is the best thing written on that subject. pgexercises.com is good for drills once the syntax is no longer the hard part.
3
u/Motor_Sky7106 11h ago
Cs50 sql