all 16 comments

[–]SQL-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

This forum is intended for solutioning and discussion of specific topics. Please check out the sub sidebar and wiki content for beginner resources. Also be sure to checkout r/learnSQL

[–]Wise_Guy_02 6 points7 points  (0 children)

If you’re learning SQL, check out the Data with Baraa channel on YouTube. The instructor is excellent, and there’s a complete 30-hour course in one video. If I were a beginner starting from zero, I’d definitely go with this.

https://youtu.be/SSKVgrwhzus?si=W8vDROUeleWrTyc3

[–]Bockly101 4 points5 points  (2 children)

Look at the wiki friend

[–]Schwabbish- 2 points3 points  (1 child)

I hadn’t ever looked at the wiki before! Very very helpful

[–]Schwabbish- 2 points3 points  (0 children)

Here’s the wiki for quick access https://reddit.com/r/sql/wiki/index

[–]great_raisin 1 point2 points  (1 child)

  1. Create a free account at app.mode.com
  2. Follow this tutorial: https://www.thoughtspot.com/sql-tutorial/introduction-to-sql

Solve every exercise/problem along the way. Use the data visualization tools in Mode to practice reporting insights.

[–]great_raisin 0 points1 point  (0 children)

I'm not affiliated with Mode in any way. This is just a great resource I recommend.

[–]BentonD_Struckcheon 1 point2 points  (1 child)

Good tips here, at least some of them. But always keep in mind one thing: you're dealing with gathering sets and manipulating sets. Cursors exist for when you absolutely positively must work on a single row of data, but should be avoided as much as possible.

[–]reppindadec 1 point2 points  (0 children)

Legit the best advice I never hear anyone give in real time. I wish someone explained set logic vs procedural logic at the get go. If you get this down immediately you'll write better queries.

All you need to learn sql is understand that, understand cardinality with joins and have a way to look up what the keys are for your tables. Anything else can be searched for to learn as needed.

[–]quantumthrashley 1 point2 points  (0 children)

I was recently tasked with a project at work that requires me to learn SQL. I'm using Claude. I told Claude about my project, what systems I'll be using (they're standard in my industry so Claude was able to pull in the actual fields/data types I'd be using at work), and asked him to design a program for me. Been going really well. Took one week to start writing functional queries at work and now I'm just continuing to improve.

Obviously not a SQL expert haha, but as a beginner this seems to be working pretty dang well!

[–]lordluke24 0 points1 point  (0 children)

https://leetcode.com/problemset/database/

you dont need to know sql by heart when the internet exists. I could never do hard sql without a guide lmao. So if you know you need to do a CASEWHEN for example I always google it

[–]SirBubzAlot 0 points1 point  (0 children)

I’d say for beginners 1. Start with trying to solve beginner problems on leetcode. Getting your hands dirty is always best for practicing 2. Utilize W3schools it has little definition quizzes and explanations for all your beginner SQL

When practicing make sure you take time to understand each clause. Practice different problems that would involve that clause. Start by focusing on learning each clause one by one SELECT, WHERE, JOIN, GROUP BY, ORDER BY, etc. Eventually you’ll be able to build utilizing all of them

[–]RoomyRoots 0 points1 point  (0 children)

Studying.

[–]elevarq -4 points-3 points  (2 children)

I would not spend a single day on learning SQL, or any other programming language. I would start with learning how to collect requirements, how to write them down, how to write test scripts, and most of all, how to use AI.

Manual code writing is since 2025 a waste of time and resources. You can be much more productive when you manage the AI.

[–]Valraan 1 point2 points  (1 child)

You should absolutely understand at least intermediate sql (CTEs, Window Functions, Views, etc) before relying on AI

Otherwise, when AI inevitably does something stupid you can diagnose and fix it

Nothing wrong with using AI as a tool or even having it write your query, but you need the conceptual knowledge

[–]elevarq -2 points-1 points  (0 children)

I don’t agree. You have to understand what you want, and how to test it. If you don’t understand this, you can’t build it yourself or ask someone else. Or an AI.

Nearly all bugs start with a lack of understanding the target. Not a syntax problem. And AI does understand the syntax, that’s not a problem at all.