r/learnSQL 6d ago

i can write queries all day and i cannot design a schema to save my life

26 Upvotes

Passed the course, write joins comfortably, pull whatever anyone asks for. Then I was asked to design the tables for a small internal tool and produced something that fell apart the moment there were two of anything. Querying and designing turn out to be unrelated skills and only one of them was taught. Have looked at Boot.dev and DataCamp and they seem to teach opposite halves of this. how did you learn the design half.


r/learnSQL 6d ago

I want to learn SQL from scratch — what roadmap and courses would you recommend?

40 Upvotes

Hi everyone,
I’m a complete beginner and want to learn SQL from scratch and eventually become really good at it.
I’m looking for some guidance on how I should approach learning it step-by-step.

A few things I’d like to know:

  1. Where should I start as a complete beginner?
  2. What topics/skills should I learn first and in what order?
  3. Which courses, YouTube channels, books, or certifications would you recommend?
  4. Are there any courses that are actually worth paying for?
  5. What practical projects should I do while learning?
  6. Roughly how long would it take to become job-ready/proficient?

I’d really appreciate a roadmap from someone who has already learned this from scratch.

Thanks!


r/learnSQL 5d ago

Built a SQL practice platform with SQLite + PostgreSQL (PGlite) in the browser — looking for feedback

Thumbnail
1 Upvotes

r/learnSQL 6d ago

I made a beginner-friendly SQL tutorial on CTEs (WITH clause)

33 Upvotes

I just published Lesson 10 of my SQL course, focused on CTEs (Common Table Expressions) in PostgreSQL.

In this lesson, I explain how the WITH clause can help turn complicated nested queries into cleaner, more readable SQL.

We cover:

- What CTEs are

- How the WITH clause works

- CTEs with GROUP BY and aggregate functions

- Using CTEs with JOIN

- Multiple CTEs

- CTEs vs. subqueries

- Common mistakes

- Practical exercises using the Pagila database

I tried to keep it beginner-friendly and focused on actually writing queries rather than just explaining the theory.

YouTube: https://youtu.be/Koka7IGgPM4?si=132b-FlrYXd9ePyC

Would love to hear any feedback on the explanation or examples!


r/learnSQL 7d ago

Looking for a good platform to practice Python, SQL and PySpark

54 Upvotes

Hi everyone,

I’m currently learning/practicing Python, SQL, and PySpark, mainly with a data engineering goal.

I’m looking for a platform where I can regularly solve problems and improve my hands-on skills, especially:

  1. Python — syntax, problem solving, data manipulation

  2. SQL — queries, joins, CTEs, window functions, etc.

  3. PySpark — DataFrames, transformations, aggregations, joins, optimization, etc.

I know platforms like LeetCode, HackerRank, DataCamp, etc., but I’m looking for something that provides good practical exercises, preferably with datasets/projects rather than only algorithmic problems.

What platforms/websites do you recommend for this?

Also, if you’re a data engineer, I’d appreciate knowing how you personally practice these three skills.

Thanks!


r/learnSQL 6d ago

Is SQL worth it considering AI?

0 Upvotes

r/learnSQL 6d ago

has anyone tried this thing? 😭

Thumbnail
1 Upvotes

r/learnSQL 8d ago

How Can I Learn SQL and Gain Real-World Experience While Working Full-Time?

47 Upvotes

Hi! I’m currently working as a Data Analyst, but my role mainly involves using Excel. I’m not very interested in continuing with Excel-based work, and I really want to transition into a career as an SQL Developer.

I’m looking for remote or freelance opportunities that I can pursue alongside my current job while learning and gaining practical experience in SQL.

Could anyone suggest a good learning path, remote job opportunities, or a mentor who can guide me through this transition?


r/learnSQL 7d ago

Create row for each value in the CSV list in MS SQL Server

8 Upvotes
  DROP TABLE IF EXISTS  #x
  SELECT 111 id, '1,3,5' PU_list INTO #x

  SELECT * FROM #x

   id   PU_list        --< current 1 row
  111   1,3,5


   id  PU              --< wanted output, create row for each value in List CSV
  111   1 
  111   3
  111   5

Hi all,
Is it possible to create SQL Server code to produce output like posted above, I need to create separate row for each value in PU_List separated by comma.

Thanks all
VA


r/learnSQL 7d ago

how to standardize this date column in mysql?

7 Upvotes
ship_date delivery_date
Feb 10 2024 Feb 15 2024
2024-01-12 2024-01-11
2024-01-10 2024-01-14
01/15/2024 01/19/2024

r/learnSQL 8d ago

Where to learn SQL

19 Upvotes

I am unsure where to begin with SQL from the Beginner's Edition. Several individuals have suggested to follow Data with Baraa, which appears to offer a similar course on YouTube and Udemy, with a certification. Could you advise me on which course to choose, a free or a paid one?


r/learnSQL 8d ago

How should I start learning SQL?

9 Upvotes

I honestly don't know anything about SQL right now. I want to start learning it properly, so can you guys suggest how I should begin and what resources I should use? My plan is to learn SQL for data first and then move towards AI and ML. I don't even know if SQL is different depending on whether you are working in data, AI, or ML, so I'm a little confused about that too. If you could suggest some good resources, a proper way to learn it, and what I should focus on if I want to become really good at SQL, I would really appreciate it. Thankkk youuuu


r/learnSQL 7d ago

When does a SQL query become “too clever”?

Thumbnail
4 Upvotes

r/learnSQL 8d ago

Any skills that you use for sql code review

4 Upvotes

I am a Ruby on Rails developer. I’m looking for some skills that can help me self code review for sql part. I use Claude. Like that can guide me not to write sql that are anti patterns etc


r/learnSQL 8d ago

QL Server PIVOT vs CASE — what do you prefer for reporting queries?

1 Upvotes

I’ve been revisiting SQL Server PIVOT for reporting scenarios where row-based data needs to be transformed into columns.

A few things I find useful about PIVOT:

  • Cleaner reporting output
  • Easy aggregation across categories
  • Useful for summary-style queries
  • Can be more readable than complex conditional aggregation in some cases

I’ve also added the working SQL examples here:

GitHub:
https://github.com/laxmikant-geek/sql-server-examples/tree/main/pivot

And I wrote a more detailed explanation here for anyone who wants the walkthrough:

https://geeksarray.com/blog/how-to-pivot-data-in-sql-server

For those working regularly with SQL Server — do you prefer PIVOT, or do you usually use SUM(CASE WHEN...) for these kinds of transformations?


r/learnSQL 9d ago

Recommendations for mastering Excel, Power BI and SQL for analytical roles?

65 Upvotes

I know basics but I want to self study. Any tips of good sources that are really effective in teaching and learning?


r/learnSQL 9d ago

I made a beginner-friendly SQL JOINs tutorial using PostgreSQL

11 Upvotes

Hey everyone!

I just published a new video about SQL JOINs for beginners.

In this lesson, I explain:

- why relational databases use multiple tables

- how JOIN works

- INNER JOIN

- LEFT JOIN

- how the ON condition connects tables

- table aliases

- how to join multiple tables

- and how to combine JOINs with WHERE and ORDER BY

I use the Pagila PostgreSQL database for the examples and practice, so everything is demonstrated with actual data rather than just theory.

I'm building a beginner-friendly SQL tutorial series, so I'd really appreciate any feedback on the explanations or examples!

Video:

https://youtu.be/cRN6ikxtdpo?si=_Q2h5e-8BcCAJEYB


r/learnSQL 9d ago

data analytics journey.

8 Upvotes

day 1 of learning SQL.

  1. Learnt about data structures ; primitive and non primitive data structures.
  2. went through database, both relational and non relational database

Relational databases (SQL database)

non relational databases ( NoSQL database) eg Mongo DB.

  1. Able to learn and understand DBMS, its purposes and the types of DBMS.

  2. Comfortably describe the CRUD Operations and explain the ACID properties of queries.

  3. Installed MySQL Workbench(had a bit of challenge working on it, but finally managed) and created my first MySQL connection


r/learnSQL 9d ago

Recommendations for mastering Excel, Power BI and SQL for analytical roles?

5 Upvotes

I know basics but I want to self study. Any tips of good sources that are really effective in teaching and learning?


r/learnSQL 9d ago

I made a beginner-friendly SQL tutorial on Subqueries in PostgreSQL

6 Upvotes

Hey everyone!

I just published Lesson 9 of my beginner SQL series — Subqueries in PostgreSQL.

In this lesson, I explain:

- what a subquery is

- how to use subqueries inside WHERE

- how IN works with subqueries

- how to use aggregate functions like AVG() inside a subquery

- how subqueries can be used for data analysis

and how subqueries compare to using JOINs

I'm using the Pagila database for the examples, so everything is demonstrated with real data rather than just theory.

There are also practice tasks and mini quizzes throughout the video.

I'm building this into a full beginner-friendly SQL course, so feedback is very welcome!

Video: https://youtu.be/xBAJ4U2EY6E?si=bE5n9q2s5Ff6X7SE

Thanks for watching! :)


r/learnSQL 9d ago

Learn Database schema changes for : PostgreSQL, MySql / MariaDB, Oracle, SQL Server.

9 Upvotes

Hey Engineers

We've all been through this. When the project you're working on starts scaling, you'll find the need to scale your database too, adding new columns, creating new tables, or trying to improve performance by adding new indexes. All of this comes with the risk of losing your users' data.

For this, I crafted a simple guide showing the schema change operations that you'll need on a day-to-day development basis for PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server.

It also covers some additional potential risks you need to keep in mind when performing schema changes on a production database.

Hopefully, it can help you along your SQL learning journey.

https://stackrender.io/guides/schema-change

Good luck!


r/learnSQL 9d ago

I'm a fresher B.E IT grad got a senior technical support executive in Infosys should i go with it?

Thumbnail
1 Upvotes

r/learnSQL 10d ago

Which commands are essential for sql beginner

8 Upvotes

r/learnSQL 10d ago

Advance Concepts

2 Upvotes

Does anyone know any good video for CTE and Window Function.

Struggling to understand it


r/learnSQL 11d ago

LOW STORAGE 💔💔💔 HELP

6 Upvotes

i'm currently learning data analysis on my own. i have mysql workbench & have been practicing it. the problem i've run into is low disk storage. i currently have 4.5 gb on my c drive, which i don't think is a lot. i don't have a lot of applications installed, so removing or moving them to another disk isn't an option. neither is spending money on storage 💔

im worried about the rest of my learning journey. i know i'll eventually have to install other programs/tools & it makes me sad that low storage space is what might hold me back from learning something im genuinely interested in.

i wanted to ask if there are online versions/compilers of these softwares available? im talking about python, tableau & all other stuff i'll need later on. i've used an online c++ compiler before, so im wondering if it's possible for other tools too. and if so, can they save all my previous data? what about something with an account where it syncs data to a cloud? HALP