r/SQL • • Sep 09 '26

Discussion How much SQL do you still write manually?

With AI getting better at writing SQL, I’ve been wondering how much SQL analysts actually write from scratch these days.
Do you still write most of your queries manually, or do you use AI for things like joins, CTEs, debugging, optimization, etc.?
And has your use of AI actually changed how much SQL you need to know?

115 Upvotes

240 comments sorted by

View all comments

Show parent comment

-2

u/elevarq Sep 09 '26

The better models have 1M tokens context window. That’s about 650k to 750k words. The average book has about 70k words.

When you need to add about 10 books as context for a single SQL statement, something is wrong. There are hardly any applications that have so much documentation!

2

u/ElHombrePelicano Sep 09 '26

I’m not sure what you’re trying to convince me of.

2

u/CalebAsimov Sep 09 '26

Can you ask AI to convince us, cause you aren't doing a great job at it.

0

u/elevarq Sep 10 '26

Why should I convince you? It's your job that's on the line, not mine. I am convinced we should learn how to manage AI and get the best results from it. When it comes to skills, AI knows far more than we do and learns much faster; there is no way we humans can compete with it.

So instead of competing with it, we spend time learning how to benefit from it. And it works. Also for complex code.

But it's up to you

2

u/CalebAsimov Sep 10 '26

I'm just making fun of how you're talking a big game about automating text but still writing your arguments when surely the AI could do that part for you.

1

u/ddBuddha Sep 09 '26

The size of the context isn’t tied to the quality of the output like that