Why You Still Need to Learn SQL in the Age of AI
AI can write queries but it won't replace understanding.
A few years ago, I wrote a post called The Dangerous Analyst. It was a call to arms for anyone doing analysis to learn SQL. With the rise of AI tools that can now write SQL for you, I’ve been thinking a lot about what’s changed and what hasn’t. This is my attempt to revisit that original idea in a world where AI is everywhere, and where the temptation to skip the fundamentals is stronger than ever.
It’s easy to imagine a future where analysts don’t need to learn SQL. AI can already write it for you. Just describe what you want in natural language, and it’ll generate a working query in seconds. So why bother learning the syntax? Why spend time figuring out joins or understanding how your data warehouse is structured?
Because that’s not why you learn SQL in the first place.
You don’t learn SQL just to produce queries. You learn it to understand your business at a fundamental level. You learn it to know how data flows from your product into your database, how metrics are constructed, and how analysis connects back to actual user behavior. Writing SQL forces clarity. It requires you to define what you’re asking and how you’re measuring it. That’s where real insight comes from.
And ironically, that kind of understanding becomes more important, not less, as AI becomes more capable.
AI will write you a plausible query. It’ll return a result that looks fine. But it won’t know if it’s right. It won’t know if a join is missing, if a table has been deprecated, or if an event is misfiring. It won’t remember that your product team changed how they track conversions last month. AI doesn’t understand the context. You do.
This isn’t like vibe coding your way to a simple web app.
Sure, someone with zero programming experience can use AI to build a basic game or a toy app. And if it’s broken, they’ll find out pretty quickly. Either the game runs or it doesn’t. The stakes are low. Feedback is immediate.
But analysis doesn’t work like that. You don’t always get a clear signal when something’s wrong. You don’t know if the churn number is off until someone challenges it, or until a bad decision gets made because of it. There’s no error message when your ARR calculation includes a duplicate join, or when it excludes an edge case that meaningfully shifts the outcome.
When you're doing analysis that your CEO or board is going to act on, you don’t just need something that runs. You need something that’s right.
You need to understand how your data is structured. You need to be able to gut-check a result and say, “This doesn’t feel right.” You need to know how to debug when a metric looks off. You need to be able to have real conversations with engineering and product about how something’s tracked, or how it should be.
AI will make good analysts faster. It’ll take care of boilerplate. It’ll save time. But it won’t make someone who doesn’t understand the data into someone who can drive insight.
So yes, use AI. Let it help. But don’t let it become a crutch.
Learn SQL. Learn how your data works. Perhaps this won’t age well, but oh well :)