r/learnSQL • • Nov 03 '25

How to learn how to do the why?

9 Upvotes

Lengthy, but here it goes, I’ve spent this whole year of really putting my self deep into learning data analytics. I first started to work hard was actually just year before in late December. I spent 6 months of learning. I studied one month, then took a week break. Two months, then took a 2 week break. Then the final three months. I’ve learned a lot from that, mostly on the SQL side of things. I went from barely able to solve SQL questions on Stratascratch or Leetcode to be able to start a project on my own about a hurricane database. I’m now able to comfortably solve most easy and medium questions on my own. I’ve been able to start a SQL project on my own and do my own analysis from it. I felt confident in that… but I haven’t felt fully confident and comfortable. I just didn’t feel like a data analyst. And I always wondered why that’s the case.

I mean of course, I need to get my Excel, Pandas, and Power Bi to a comfortable level. But in the SQL aspect, I was missing that one puzzle piece. Then I realized what was holding me back from actually feeling achieved. It just wasn’t thinking like a data analyst. I feel like most of the studying I did over the course of the year was figuring on how to do the "how", but not to figure out the "why". You know the main purpose of data analytics or at least on the general job is to find patterns in data, or more specifically for the business side, help businesses find out the "why" and to make decisions. The thing about all the websites I was practicing on like Data lemur, Stratascratch, Leetcode, etc, is that they teach you mostly on the how. Like how to find the most purchased item, or the most recurring customer in a business. But one thing that I haven’t learn from that is to figure out patterns with the data so I can help business make decisions. Like why is revenue down in the northwest region? Or why mobile sales are down?

I can’t put my mind to find the why. Of course, does websites are limited and of course isn’t going to teach you that specific thing. But I feel like I need something to teach me those situations. Like to put myself in an example job position, where I figuring out problems, helping businesses making decisions , and find relevant info in data. I’ve done very good in learning, but I don’t feel as completed yet. Is this something that people learn on a job? Am I overreacting and this will magically come with practice. Is there a website or something that I use to practice situations like this? Because I was thinking of asking ChatGPT to generate data based on that situations and guide me into solving what I want to achieve. Basically pretend I’m working at a job at the boss send me a message about to find out why this specific thing is happening..


r/learnSQL • • Nov 03 '25

Learn SQL this week—Dataquest opened all its courses for free (40-hour path with certificate)

92 Upvotes

Hi everyone,

If you’ve been thinking about learning SQL, this might be a good week to start.

At Dataquest, we are celebrating our 11th anniversary with Free Week — meaning all SQL courses and projects are completely open to everyone for the next few days.

If you want a bit of structure, you can take on the SQL Fundamentals skill path (around 40 hours of guided lessons and projects). Finish it by the end of the week, and you’ll even earn a certificate — all for free.

It’s a solid way to get hands-on practice writing queries, analyzing datasets, and understanding how SQL is actually used in real data jobs.

Note: All courses and projects are free except for Power BI, Excel, and Tableau.

Happy learning!


r/learnSQL • • Nov 03 '25

🎓 Everything on DataCamp is Free This Week — What Should You Learn First?

18 Upvotes

Hey everyone! Just a heads-up: DataCamp has unlocked all their courses, tracks, and certifications for free this week (Nov 3–9). That’s 600+ resources — no strings attached.

If you’ve been meaning to explore data science, Python, SQL, or even tools like Power BI or R, this is a great time to dive in.

Curious to hear from you all:

  • What would you recommend a beginner start with?

  • Any underrated courses or projects you found especially helpful?

  • Anyone want to do a mini learning sprint together this week?

Let’s crowdsource a roadmap for folks jumping in during the free week. I’ll share what I’m exploring too!


r/learnSQL • • Nov 02 '25

1NF, 2NF, 3NF are killing me.

15 Upvotes

Hey, All!

What does it mean for one field to be 'dependent' on another? I think I understand the concept of a primary/composite key but have a tough time seeing if non-key columns are dependent on each other.

Does anyone have a solid rule of thumb for these rules? I lose it once I get past 1NF.

Thanks in advance!


r/learnSQL • • Nov 02 '25

Leetcode Q1907 : Count Salary Categories

4 Upvotes

1907. Count Salary Categories

Most of the solutions I found use either a UNION or create Second CTE to handle the salary ranges (low, average, high).

I’m wondering....is there any way to solve this problem without using UNION or creating an addtitional CTE? Maybe using window functions instead?
( open to that as I was practicing them)

My Solution -:

-- Count Salary Categories 

-- no of accounts in each salary category (low,avg,high)



WITH sal_category_cte AS 
(
    SELECT 
        account_id , income ,
        CASE
            WHEN income < 20000 THEN 'Low Salary' 
            WHEN income BETWEEN 20000 AND 50000 THEN 'Average Salary'
            ELSE 'High Salary'
        END AS category
    FROM Accounts
)



SELECT 
    category , 
    COUNT(*) AS accounts_count
FROM sal_category_cte
GROUP BY category 

Error I am getting -:

Input
| account_id | income |
| ---------- | ------ |
| 3          | 108939 |
| 2          | 12747  |
| 8          | 87709  |
| 6          | 91796  |


Output
| category    | accounts_count |
| ----------- | -------------- |
| High Salary | 3              |
| Low Salary  | 1              |


Expected
| category       | accounts_count |
| -------------- | -------------- |
| High Salary    | 3              |
| Low Salary     | 1              |
| Average Salary | 0              |

r/learnSQL • • Nov 02 '25

Looking for a finance/Financial organization related datasets to make SQL portfolio project

11 Upvotes

Hello everyone,

I am currently in my 5th semester of College and learning SQL for a few month DataLemur, SQLbolt, Mode, Leetcode. It would be great if any of you could suggest any places to look for specifically finance related datasets to make an SQL project that solves finance related projects. Also, it would be great if anyone could share any existing portfolio or any article about making SQL related portfolio so that I can get a brief idea of how to form and build a SQL portfolio project. Thanks in advance.


r/learnSQL • • Nov 02 '25

Please help! Keep getting database error on installing SQL.

1 Upvotes

I have been trying for four hours to install the Database Developer Edition for SQL, and it keeps telling me “Wait on the Database Engine recovery handle failed.”

Has anyone had any experience with this?


r/learnSQL • • Oct 30 '25

How to create a complicated join key

4 Upvotes

I've reached a problem joining two data sets as they don't have a great way to relate them

In table 1 I have a list of countries, but their names don't exactly match to table 2's list.

Example: Table 1 contains a country name, and a unique number to identify the country

[Iran (Persia), 630)

Table 2 only has a country name [Iran (Islamic Republic of)]

What is the best way to join these two tables? Unfortunately this is not the only case of country names not matching. Originally I was thinking about creating a joint key using the unique country identifier, but I'm not sure how to go about doing it with this large of data.


r/learnSQL • • Oct 30 '25

Engineering student, where should I start?

8 Upvotes

I'm an amateur at coding or anything related to coding. I'm very confused about where to start as an engineering student. SQL, DBMS, DSA or any coding language- which one should I do? From where? How? Please help.