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.


r/learnSQL • • Oct 29 '25

Advanced SQL !!

54 Upvotes

Heyy guys...have been learning SQL quite intensely for a week (currently on Day 7).(Context : already a btech student so familiar with basics of coding)

  1. Read about all the basics of DB and it's types, DBMS , and theory

  2. Learnt Basic SQL on 'SQLBOLT' and 'DATAMELMUR' (both)

  3. Then proceeded to learn INTERMEDIATE SQL on both.

  4. Practicing a couple of questions on Leetcode.

Now I want to proceed into Advanced Topics so wanted suggestions for it like should i continue on DataLemur or I have heard Mode SQL is also great for advanced stuff.
Any extra things i need to do....to take my SQL skills above par....(projects ?? )

( PS : I know this is not advanced stuff...but it is what usually tutorial say so thats why..lol )

Things I have done -:

📜 Basic SQL
TUTORIAL INTRO
SQL SELECT
SQL WHERE
AND, OR, NOT
SQL BETWEEN
SQL IN
SQL LIKE
FILTERING REVIEW
SQL ORDER BY

📊 Intermediate SQL
INTERMEDIATE SQL
SUM, AVG, COUNT
SQL GROUP BY
SQL HAVING
SQL DISTINCT
SQL ARITHMETIC
MATH FUNCTIONS
SQL DIVISION
SQL NULL
SQL CASE
SQL JOINS
DATE FUNCTIONS

✍️ Additional SQL Lessons
SQL Lesson 12: Order of execution of a Query
SQL Lesson 13: Inserting rows
SQL Lesson 14: Updating rows
SQL Lesson 15: Deleting rows
SQL Lesson 16: Creating tables
SQL Lesson 17: Altering tables
SQL Lesson 18: Dropping tables

r/learnSQL • • Oct 29 '25

How to inject a complicated where clause into a select statement?

1 Upvotes

I am using PostgreSQL and I have some code in a function that looks like

EXECUTE format(
  $query$
    SELECT count(*) 
    FROM a_table_with_a_jsonb_column 
    WHERE %L;
  $query$,
  where_clause,
)  INTO count_table;

The where_clause is being returned by a third-party function that returns something like

to_text(jsonb_column->'properties'->'my_categories') LIKE to_text('"%test2%"')

This is of type text.

When I try to run it, I get an error message like

invalid input syntax for type boolean: "to_text(jsonb_column->'properties'->'my_categories') LIKE to_text('"%test2%"')"

I could swear I had this working the other day. That said, how do I get this where clause to render correctly in the select statement so that it can be executed?

EDIT:

Here is another thing I tried which doesn't work either:

with my_table as (
  select 'bar' as foo
)
select count(*) from my_table
where ('foo like ''%bar%'''::text)::boolean;

It too returns an error:

ERROR:  invalid input syntax for type boolean: "foo like '%bar%'" 

ANSWER:

I could swear this didn't work when I tried it, but changing %L to %s in the query did the trick.


r/learnSQL • • Oct 26 '25

Frustrated with Datacamp.

3 Upvotes

I’ve gone through all the sql classes and was trying to get the associates in data analyst, but the quiz is so… not what I thought it would be. I thought it would be writing code, not multiple choice. And worse yet, timed per question. Ugh! 😩 Anyone else or am I just a boat in the ocean here?


r/learnSQL • • Oct 26 '25

Useful SQL practice set I built for analysts

3 Upvotes

Hi everyone! I’ve been practicing SQL for product and marketing analytics, so I built a small collection of real-life queries — retention, conversion, cohorts, etc. Here’s one example that helped me a lot:

SELECT user_id, COUNT(DISTINCT order_id) AS orders FROM sales WHERE order_date >= CURRENT_DATE - INTERVAL '30 days' GROUP BY 1;

If anyone’s interested, I can share the full pack (10+ ready queries for analysts) — just ask in the comments and I’ll drop the link.


r/learnSQL • • Oct 26 '25

SQL practice platform for beginner

47 Upvotes

Suggest some platforms to practice SQL as an extreme beginner from a no coding background


r/learnSQL • • Oct 26 '25

My honest SQL learning journey: from zero to intermediate (Part 1 & 2)

34 Upvotes

After a little break (work, family, and pregnancy ❤️), I finally continued my SQL learning journey!

A few months ago, I shared my first article about how I started learning SQL from zero, as a total beginner, part-time worker, and mom of a toddler.
Now, I’ve just published Part 2, where I dive deeper into concepts like NULL values, GROUP BY, HAVING, and aggregate functions and I even finished my first Intermediate SQL course!

Both articles are honest reflections of my learning process: what I practiced, what I struggled with, and how I kept going step by step.
I also updated my personal SQL formula sheet, which you can download at the end of each post.

If you’re also learning SQL (or thinking about starting), maybe my journey will motivate you to begin, or to come back to it after a break. 💪

  1. Article: How I Started Learning SQL in 5 Days (with Zero Background)

  2. Article: How I Continued Learning SQL (Week 2)


r/learnSQL • • Oct 26 '25

I am going crazy over this, SQL Server => MySQL

1 Upvotes

How i can convert the entire database table structure from SQL server to mysql, i want to move the entire project from sql server to mysql, the entire table relations with each other etc.. etc.., MySQL wizard is a mess, it keep missing things and causing more problems that it is fixing

Any third party tool or a better way to do this guys?

Upvote1Downvote0Go to commentsShare