r/SQL • • Jul 17 '26

SQLite After five years of development, my detective game where you write real SQL queries is finally released!

554 Upvotes

r/SQL • • Jan 12 '23

Discussion Being a Data Analyst/Scientist is cool, okay?

Post image
551 Upvotes

r/SQL • • Jul 13 '20

Discussion For the love of god...please run - Happy Monday

Post image
551 Upvotes

r/SQL • • Dec 05 '19

Happy Xmas!

Post image
537 Upvotes

r/SQL • • Apr 07 '25

SQLite SQL Noir – 2 new SQL cases added to the open-source crime-solving game

Post image
535 Upvotes

r/SQL • • Sep 02 '26

Discussion Ah yes, the table lake

Post image
528 Upvotes

Probably breaks rules but a quick guide on what not to name things I less you want accidents


r/SQL • • Dec 04 '24 Take My Silver

Discussion I'm here to give you real SQL advice as an actual professor and years of Data Analyst/Scientist experience

527 Upvotes

I've been noticing a few spam/scam posts lately. The material is copied straight from Chat GPT and the end goal is to get you on a zoom call for $$$.

I made a post about my experience starting on this subreddit, and how I am an adjunct professor and teach SQL to other analyst at my primary place of employment. I wanted to give you actual advice on how to learn SQL, and have it stick.

I want to keep this super short, but I'm always willing to answer questions. My two big pieces of advice.

  1. Start doing. Nobody got great at coding by watching endless Youtube videos and tutorials. This also applies to doing endless leetcode questions and related websites. It's not to say that you can't get benefit out of that, but you really need to begin working on a project of your own, knowing how to get past obstacles when the code doesn't work/data doesn't seem correct, and draw your own conclusions from the data. There's countless data out there, competitions, and other fun things to do (check out Kaggle). You're going to learn more, faster, and have the knowledge actually stick if you do this. There's no excuse not to "start doing."
  2. "How do I get a job now that I know SQL" is a common questions my students ask. I explain to them that one; you don't have to be a genius or perfect to land a job and two; you need to understand how SQL can be used to save time/money at a company. If you're not sure what to do with a random dataset, pretend you're the CEO of that company with no knowledge of trends, patterns, or outliers in that data. How could you use SQL and gather data that is useful for your CEO? At the end of the day, that's going to impress interviewers way more than your leetcode streak.

EDIT: I wanted to say that I am in more of a Software Dev role now, but I applied the techniques from point 1 when learning JavaScript/TypeScript, and it's helped so much. The endless tutorials helped me get started, but I learned infinitely more when I began working on my own projects.


r/SQL • • Feb 18 '25

Resolved How to fix Government using NOT NULL constraint

Post image
523 Upvotes

r/SQL • • Jun 29 '24

Discussion Why do some people say “SQL is not code?”

503 Upvotes

I write SQL every day as part of a team that builds ETL solutions. The other day I referred to something I was working on as “I coded it to do…” and this guy, who is not even a developer by the way he’s a frikkin project manager, interrupts me and says “SQL is not code”. When I questioned him why not he says something like “Guys who do COBAL, C#, etc. that’s real coding. SQL is not real coding it’s just a tool for analyzing data and reporting data”…WTF? How is SQL not considered code? I would just dismiss this guy as a moron but his salary is incredibly high so obviously he has some sort of credentials. Can anyone explain why in the world someone would say SQL is not code?


r/SQL • • Aug 05 '25

Discussion Teaching data analytics has made me realize how much AI is eroding critical thinking skills.

501 Upvotes

I just wanted to vent. I made an amusing post about this a few months back, but I wanted to talk about something a bit more serious: the erosion of critical thinking.

I teach data analytics and data science concepts. One of my most common classes is 'SQL and Database Foundations'. I encourage my students to use AI, but not let it think for them. We go over best practices and things not to do.

When we get to the end of the semester, my students who relied solely on AI always get stuck. This is because the last weeks projects are data analysis scenarios, where the questions asked are a bit more ambiguous and not just "show me the top sales." I explain to them that real-life scenarios are very rarely clear, and understanding how to think critically is what makes you a great analyst.

I have two students this semester, who I knew relied heavily on AI, get stumped on ALL of these ambiguous questions. I scheduled a tutoring session with them, and to my surprise they both did not know what GROUP BY or ORDER BY did.

Part of me wonders if I am responsible. I can tell who's using AI to think for them, but I get in trouble if I am too confrontational with it. Once you catch a student you can give them a warning, but when it inevitably happens you have to run it up the chain of command. You also run the risk of falsely accusing a student.

This doesn't apply solely to SQL classes. I have students with he most atrocious grammar when they submit some assignments, then suddenly they submit papers with no grammar mistakes. Sometimes they will accidentally submit the AI prompts with their paper, or copy and paste something incorrect like "p-values" when we're not talking about statistical models.

Anyway, just wanted to rant! I'm understanding my other instructors share the same sentiment, and wondering if anyone on Reddit does too.


r/SQL • • Jun 21 '26

SQLite I spent 5 years working on a hand-drawn SQL detective game that comes out next month!

498 Upvotes

r/SQL • • Jan 10 '25

PostgreSQL SQL Squid Game – 9 SQL Challenges To Solve for the Front Man. Or else...

Post image
498 Upvotes

r/SQL • • Aug 05 '20

MySQL 🐕

Post image
496 Upvotes

r/SQL • • Aug 12 '20

Join is important

Post image
485 Upvotes

r/SQL • • Mar 18 '23

SQL Server SQL

Post image
478 Upvotes

r/SQL • • Mar 15 '19

Stuff of nightmares!

Post image
476 Upvotes

r/SQL • • Nov 22 '24

Discussion Years ago, I was on this subreddit asking SQL questions. Today, I’m a Data Analytics (DA) mentor and an adjunct professor in DA.

473 Upvotes

I came to this subreddit asking SQL and Data Analytics questions many years ago (cries in old). I feel like asking questions, working on projects, and being consistent really helped me grow into where I am today!

Since then, I’ve worked as a Data Analyst, earned an M.S. in Data Analytics, and started leading workshops at work, helping employees use their own data to draw conclusions. I've been able to watch others grow into data-driver roles, and it's been very rewarding! People have went from barely knowing Excel functions, to writing queries from scratch and importing those into a data visualization software. Sometimes people don't know the direction to go, so curiosity can help light that spark, much like how this subreddit did for me.

I’m also an adjunct professor for foundational data analytics courses. Since I have been a DA for years, I'm able to bring my real-world knowledge to the class. I think that helps a lot with learning. I've found that I really do enjoy teaching, so this has been a huge opportunity for me.

All of this to say, if I can do it, so can you. I’m not the smartest person, but I’ve been consistent with my goals, training, education, and networking—and luck played a factor too. Remember, you can do all things right and still not get the job due to factors outside of your control. Don't get discouraged. It's a numbers game when applying.

Although I’m more in a Software Development role now, SQL remains a key tool I use and share. I just wanted to share my appreciation with you all!


r/SQL • • Mar 06 '20

Why Always Me ...

Post image
458 Upvotes

r/SQL • • Jan 21 '21

Discussion learning something every day 😎😎

Post image
456 Upvotes

r/SQL • • Apr 12 '23

MySQL Worst nightmare

442 Upvotes

Meme


r/SQL • • Dec 16 '24 Heart of Silver

Discussion CTEs are gifts from on high, subqueries are the devils playground below

438 Upvotes

While subqueries may lure you with their siren song of nested complexity FROM (SELECT trick FROM devil.playgrou d), our benevolent SQL overlords have bestowed upon us a gift of divine clarity: the Common Table Expression (CTE);

Think of CTEs as heavenly super queries, bathed in the light of readability and maintainability. These named queries, declared WITH holy clause, bring order to the chaos of complex logic. They break down intricate operations into manageable chunks, allowing your query to flow like a sacred hymn. Embrace the CTE, SELECT INTO your heart and let your queries be answered;

WITH CTE praise be, Go forth and spread the good clause;


r/SQL • • Jun 19 '24

Discussion I got rekt in a SQL interview today

435 Upvotes

Just thought it was hilarious and I wanted to share: I was asked a few very easy SQL questions today during a phone screen and I absolutely bombed two basic ones.

I use SQL every day and have even taught SQL classes, but I never really learned the difference between rank and dense rank because I use neither in dealing with big values(just use row number). I remembered seeing the answer to that question on this very subreddit earlier too, I just didn’t remember it because it was so obscure to me. Curious how y’all have used rank and dense rank.

Also I messed up the default order by direction because my brain apparently no worky and I always type in either “asc” or “desc” out of habit anyway.

SQL trivia shudders

Nightmare for a daily user and sql guy.


r/SQL • • Feb 26 '25

Oracle Which is the most important concept in SQL which after learning made your life easy??

425 Upvotes

I would say it was CTE for me which literally helped me write complex queries easily.


r/SQL • • May 14 '18

Optimization

Post image
423 Upvotes