r/learnSQL

Udemy SQL

Last year I failed database management and have to retake it to finish my program. I found SQL to be very challenging, and my school has limited tutoring. If any of you have recommendations for a very beginner-friendly, easy-to-understand course I can purchase through Udemy, I would appreciate it. I've had some good experiences with learning from Udemy because it is broken down into smaller steps and explained differently.

reddit.com
u/rackham29 — 13 hours ago

How do i grasp Concepts in SQL easily?

I'm struggling to understand the concepts of sql badly, i mean which framework i mean POV is best for grasping? Could you guys share your thoughts. I want to grasp, so that i can tell to the people like 5 years old kid, non tech persons.

reddit.com
u/ParticularBet5580 — 1 day ago
▲ 35 r/learnSQL+1 crossposts

SQL SIDE QUEST - An Immersive story-telling SQL Game. Chapter 3 is out!

https://www.sqlsidequest.com/ CHAPTER 3 IS NOW LIVE!

Last year in Dec 2025 I released SQL SIDE QUEST which took over 3 years to build. I wanted to create an immersive story-telling way to learn and practice SQL, and hence sql side quest was born.

Its completely free, browser-based, no signup. Been solo on it the whole time. Looking forward for your feedback :) Cheers and Enjoy

sqlsidequest.com
u/sqlsidequest — 1 day ago

What's Missing in learning or Teaching SQL?

I enjoy this sub but it feels like most posts are the same. "I created tutorial/course/practice/etc." Or "how do I learn/practice/projects/etc." It's good. A really active sub.

What I'd love to know, is what do people who are learning SQL want? For instance, I've taken a different approach. Over the past year I've worked on tooling to make creating courses and practicing more efficient. Other's have worked on more scenario-based learning (always a good idea). Some have gamified learning and that's a lot of fun.

My real question is for those of you learning or teaching. What is missing? Is there something you wish you had that doesn't exist?

In my perfect world, learning SQL would feel more like working in a business environment. Large, complex data warehouses, where you learn the data and SQL over time. Lot's of problem solving and judgement when there is ambiguity. Something that feels more like doing real work.

Would having more tools available to make it easier to create courses, practice, etc. be useful? Would having more realistic environments to learn in be useful? Is it something else completely? In short. What's missing?

reddit.com
u/leogodin217 — 1 day ago

Free browser-based SQL courses and playground for PostgreSQL, SQLite, and DuckDB

Hey r/learnSQL,

I've been working on Dataslope, a free site for learning and practicing SQL and other languages. No account or sign-in is required.

It currently has four free SQL courses:

There's also a browser-based SQL workbench that supports PostgreSQL, SQLite, and DuckDB. No installation or local database setup needed.

I’d love any feedback or suggestions from anyone learning or teaching SQL.

u/Creative_Sugar-33 — 2 days ago

SQL Interview Tips - Shorts Style

Hi All 👋,

I have been posting SQL interview tips as less than 1 min shorts in my youtube channel.

Some tips for reference below :

COUNT(*) vs COUNT(column) -

https://youtube.com/shorts/tTtoWa1OCIo?si=V2KZaDDNFhbfbhg7

Ranking Window Functions( ROW_NUMBER, RANK, DENSE_RANK) -

https://youtube.com/shorts/MyaH-v0CUUk?si=mHfEteTUkx5mUoHI

Replace NULLs -

https://youtube.com/shorts/NdoBwKAFcE0?si=2zXqab8lqG45QXLk

ORDER BY tricky part -

https://youtube.com/shorts/9bRm0IEKQRo?si=XUXqTQzbfLQD6\_Rs

I have also covered other topics like Anti-JOIN, WHERE vs HAVING,

LIKE vs ILIKE, IN vs NOT IN vs NOT EXISTS.

I will be continuing the series with similar style covering most important SQL topics through interview tips.

Feel free to check out and share it with whoever it benefits.

GRASSP Acad channel link -> https://m.youtube.com/@grasspDataAI/shorts

Happy learning:)

u/grassp_dataAI — 2 days ago

learning Advice !

Hello Everyone

dear friend and respected teachers today I am here for something clarity .first my self I am a student and i am learning data analyst 6 month ago . Everyone know that sql much important in this journey .I practice basic sql queries which based on basic foundation like DDL,DQL , DML and JOINS. I Practice 70 question on it but I am not sure that what i do next i mean i am confuse because I have seen many course on youtube everyone is different of other so i am not understand that which topic i learn now or do more practice on previous concepts and what topic really useful in company or real word problems and i want to optimize my learning path of sql .

So Please give me clarity and helpful resource for that in chat box
Thanks of all

reddit.com
u/Nervous-Jellyfish326 — 3 days ago
▲ 10 r/learnSQL+1 crossposts

18, self-taught, aiming for my first data analyst role. Built a SQL case study and an ETL pipeline. What would make these actually interview-ready?

I'm 18 and teaching myself data analysis with the goal of landing an entry-level analyst job, ideally in healthcare. Instead of just doing tutorials, I tried to build two projects that mimic real analyst work, and I'd really appreciate honest feedback from people who actually do this for a living.

The first is a SQL case study. I built a realistic clinic-network database (patients, providers, appointments, billing) and wrote 15 business questions against it, working up from basic aggregation to window functions like RANK, NTILE, and running totals. The idea was to answer things a practice would actually care about, like no-show rates by insurance type and which patients drive most of the revenue.

The second is an end-to-end data pipeline using real public health data for Westchester County, NY (from the NY State DOH). It pulls the raw data, cleans it, runs data-quality checks, calculates some statistics and a composite "health index," and outputs an interactive dashboard. The part I'm most proud of is that the logic is direction-aware, so it knows a higher vaccination rate is good but a higher mortality rate is bad, instead of blindly comparing numbers.

A couple of honest notes: the SQL database is synthetic (built to have realistic patterns), while the pipeline uses real published data.

My questions:

  1. For an entry-level analyst, do these show the right skills, or am I missing something obvious that hiring managers look for?
  2. Is a composite index a good idea to showcase, or does it look like I'm overcomplicating things?
  3. What's the single most valuable thing I could build next?

Link to repo in the comments. Thanks for any feedback.

reddit.com
u/dumibumi — 3 days ago

Trying to build a project for portfolio

Hi! I'm learning sql right now. Do you know what kind of project should i build?

reddit.com
u/MrLanc3 — 4 days ago
▲ 6 r/learnSQL+1 crossposts

Looking to Re-Enter DBA Field

Hello,

I am a former database administrator who is looking to re-enter the field of database administration. I started as an entry-level DBA working with Oracle back in the '90s. After a year or so of working with Oracle, I started working with SQL Server and a little bit with Informix databases. I did the typical administration tasks of backup/recovery, performance tuning, troubleshooting, building database, security. However, I would now, in 2026, like to return to the field. I have about five years of experience in the field which I believe spanned from 1996 to 2001 or 2002. I took the standard classes taught by Oracle for version 7 at the time and I either fell a little short of, or actually did, get(ting) certified for Oracle Version 7.

When I look at the positions nowadays for database adminstrators, they are unsurprisingly radically different than what I saw when I last looked for work as a DBA back in the late 90's. My question is what would your advice be in seeking education and certifications in order to become more marketable for someone like me who is re-entering the job force as a DBA?

Thanks.

reddit.com
u/Consistent-Chef-5449 — 4 days ago
▲ 59 r/learnSQL+4 crossposts

how I learned why you shouldn't name an alias the same as the original column name

I wrote a query last week that ran fine on Postgres and DuckDB, and hard-errored on ClickHouse and BigQuery - this sent me down a rabbit hole for most of the day.

Here's what I had:
```
SELECT term, MAX(ranking_page_count) AS ranking_page_count
FROM ranked
GROUP BY term
HAVING MAX(ranking_page_count) >= 2
```

The CTE already had a column called ranking_page_count. I aliased MAX() of it to the same name, because why not, and then used that name again in HAVING.

So which one does HAVING actually filter by? Turns out that's a matter of opinion.

In Postgres, HAVING can’t see SELECT aliases at all. So it reads the column directly and lands on the same max anyway - no error, right answer.

DuckDB does let you use aliases in HAVING, but only as a fallback, and it won't put one inside an aggregate, so this also runs. This is the one that got me, since DuckDB is where I test locally.

BigQuery gives the alias priority over the column. So it read my query as MAX(MAX(...)) and gave the error "aggregations of aggregations are not allowed"

ClickHouse just swaps aliases in everywhere, so it gave code 184 illegal aggregation. it even fails when the alias isn't shadowing anything.

The thing that finally made it click for me was processing order. FROM, WHERE, GROUP BY, HAVING, then SELECT, then ORDER BY. Aliases get created in SELECT, so when HAVING runs the alias doesn't exist yet. That's why Postgres says no, and why everything else here is a vendor extension rather than four equally valid readings.

ORDER BY is the only clause that runs after SELECT, which is why it's the only clause where nobody argues.

What actually worries me is that it can go completely silent. Drop the aggregate from the alias and the loud error disappears:
```
SELECT term, ranking_page_count * 10 AS ranking_page_count
FROM ranked
GROUP BY term, ranking_page_count
HAVING MAX(ranking_page_count) > 4
```

Postgres and DuckDB filter on `ranking_page_count`
BigQuery and ClickHouse filter on `ranking_page_count * 10`
I get 1 row from the first two and 4 rows from the other two, and not one of them raises an error about it.

That's the version that ends up on a dashboard.

ok fine, I learned my lesson and won't name an aggregate after the column it aggregates...

If you work across different engines, this is your reminder to go check 🥲

reddit.com
u/uncertainschrodinger — 6 days ago
▲ 15 r/learnSQL+1 crossposts

Career ideas for pivoting away from accounting

So I've got an accounting degree with a few years of experience in Audit. I'm an advanced excel user with some knowledge of SQL and Python (Maven Analytics).

Does anybody have any advice on a logical career progression away from Audit/accounting and into something more technical? (unfortunately I can't go back in time and become software developer). Database design & workings of accounting software seem interesting. Also fraud investigations.

It doesn't have to be the best paying option (BI/data analyst) but just something that would stop me chopping & changing jobs.

Thanks

reddit.com
u/Glad-Daikon1930 — 6 days ago
▲ 311 r/learnSQL+45 crossposts

I've been building a SQL learning platform for the past few months. It's called QueryCase and I'd love honest feedback

I've spent the last few months building something and I'm finally at the point where I want to share it properly rather than just quietly hoping people find it.

The idea came from a frustration I kept seeing (and feeling myself): SQL tutorials teach the syntax fine but there's never a reason to care about the answer. You filter a table called employees, get a result, and nothing happens. Your brain doesn't bother keeping it.

I wanted to try a different approach. QueryCase teaches SQL through detective investigations. You get a briefing from Chief Fox (our mascot), a real database to query, and a mystery to crack. The JOIN matters when a suspect has an alibi. The WHERE clause matters when you're trying to find who entered the building at 22:13. The SQL is the tool for solving something, not the point in itself.

Here's what's actually in it:

  • A structured learning path across 54 cases, going from Recruit through Rookie, Detective, Senior Detective, and Chief Detective. Each rank has drills and a level exam to pass before you progress.
  • Sandbox mode where you can explore real datasets (IMDB movies, Spotify, sports stats, Steam games) and run whatever you want with no pressure and no mystery attached. Just free exploration against actual data.
  • Everything runs in the browser using DuckDB WASM so there's nothing to install.

I'm a solo developer and this is genuinely early days. I'm sharing here because this community is exactly the kind of people I built it for, and I'd rather get honest feedback now than find out later I've built the wrong thing.

What's missing? What would make you actually stick with something like this versus what you've used before?

querycase.com if you want to take a look.

Any feedback appreciated!

u/conor-robertson — 8 days ago

How Senior Engineers Design Production Databases

If you're learning SQL, this is a pretty good walkthrough of how to approach database design in a real application.

A lot of developers don't spend much time thinking about database design until they start running into problems as their applications grow.

This video https://www.youtube.com/watch?v=Xq2fYRA3dj8 goes through the fundamentals of designing a production database, including table structure, relationships, primary and foreign keys, junction tables, composite keys, timestamps, UUIDs, and foreign key actions such as CASCADE and SET NULL.

I thought it was worth sharing here for anyone learning SQL or trying to improve their database design skills.

u/tamanikarim — 5 days ago

Confused what to do

Hii , I am CSE student and my second year has just started . I have completed around 70 Dsa questions on Leetcode and have studied Python(Only that much which is required for Dsa),Numpy,Pandas, Matplotlib, Seaborn, Sql. Everyday I either solve dsa questions or learn maths for data science and machine learning or practice sql. But the problem is I have studied these things but never used them in a project or never done some sort of data cleaning and stuff cause I don't know how to do that. Now it's time to participate in hackathons but I don't know how to start and I can really build something with only these skills. What is your advice what should I do from here also I need to participate in hackathons also (I am enrolled in a DS course where for about 1.5 months they will teach maths then will jump to Machine learning and other topics)

reddit.com
u/Available-Side9673 — 5 days ago

Aspiring data analyst

Good day,

I have been teaching myself SQL and now power Bi I do understand the basics. Currently I am working in a law firm and I decided to start using the firms data sets that show the matters we have and the stages that they are at. I have managed to play around with the data set in SQL by even creating views of the columns that I want to see and stored procedures. Now where I am struggling is how do I build a portfolio with this and meaningful dashboards in PowerBI. I am kindly asking if there is anyone who has built a portfolio and can kindly assist me as I feel stuck here. Or any advice for me to move from here. Thank you so much

reddit.com
u/Spiritual_Ear_5461 — 6 days ago

Struggling with LeetCode Easy after doing well on HackerRank Easy — should I move to intermediate SQL?

​

I wanna be straight about this because it’s getting frustrating 😭

I can comfortably solve HackerRank Easy-level SQL questions, but when I try LeetCode Easy, I struggle quite a bit.

I’ve seen people say that HackerRank Easy ≠ LeetCode Easy and that LeetCode can require more problem-solving/thinking even at the Easy level.

So I’m confused about what I should do next.

Should I:

Keep grinding LeetCode Easy until I’m more comfortable?

Or is being able to solve HackerRank Easy well enough to start learning intermediate SQL concepts like subqueries and CTEs, while continuing to practice problems alongside it?

Basically, I don’t want to move on too early and build gaps in my fundamentals, but I also don’t want to unnecessarily stay stuck on Easy problems when I could be learning more advanced SQL.

What would you recommend?

reddit.com
u/Few-Hour-7991 — 7 days ago

why COUNT(*) and COUNT(o.id) aren't the same after a LEFT JOIN

say you have customers on the left and orders on the right.

a LEFT JOIN keeps every customer, even if they have no matching order. for those rows, the columns from orders are NULL.

that creates a small gotcha which i saw a few players falling for in their queries:

-COUNT(*) counts the joined row.

-COUNT(o.id) only counts rows where o.id isn't NULL.

so this:

customer | order_id

Alice | NULL

Bob | 123

Bob | 456

becomes:

COUNT(*) | COUNT(o.id)

Alice 1 | 0

Bob 2 | 2

I made a 43 sec chalkboard animation showing the join happen visually:

https://www.youtube.com/watch?v=zxSZFMtyheA

is this helpful? i could try making a few more then.

u/Plane_Big_5912 — 7 days ago

Why memorizing SQL syntax fails in interviews (and how I'm designing a tool to fix it)

When practicing SQL, standard platforms usually give you a schema, a goal, and then reveal the output query when you get stuck. The problem is that in a real interview setting, interviewers are evaluating how you break down the problem—not just whether you remembered GROUP BY syntax.

I spent the last few months building an Android app called SQL Star aimed strictly at developing query intuition rather than rote memorization.

To make it genuinely useful for interview prep:

  1. Offline Execution: Built a local SQLite execution engine so queries run instantly on-device without needing internet/servers.
  2. Deep-Dives over Final Answers: Rather than just showing the output query, each question is paired with a business scenario, step-by-step breakdown of why specific clauses are chosen, common edge cases, and mistakes to avoid.
  3. Interview inspired: Structured 1,000 scenario-driven and interview inspired questions across different company domains.

It's hitting the Play Store soon. Would love to get your thoughts on how you usually approach developing query logic versus just memorizing function signatures.

reddit.com
u/ushakishorapps — 8 days ago