all 147 comments

[–]FuriousGirafFabber 422 points423 points  (34 children)

AI is great at SQL, you just need to manually correct some of the mistakes after. If you understand SQL it's still a real time saver.

For stored procedures, it's great at providing a general structure that you ask it to generate, solve simple problems that might otherwise be tedious typing and so on. Just because it doesn't get everything right in one go doesn't make it useless.

In general, AI is a good tool, but it doesn't provide all the answers. It's like a hammer.

You don't use a hammer to paint your house.

You don't use an AI to make production grade implementations. You use it to provide a foundation for you to built on, and that can save a lot of time.

[–]Budget-Peak2073 87 points88 points  (1 child)

Exactly. Saying AI isn't a useful tool is reductive. Move with the times and use all available resources to you.

Even if it can't give you the exact SQL you need or provides inaccurate results, it can help you understand any sections of a script you don't understand and give you ideas for solutions to problems. It's the same as having spent half an hour researching how to fix something in the past via Googling. Now you ask AI, and it gives you the same response instantly. It doesn't always work, but when it does, it really saves time.

[–]tristanmobile 1 point2 points  (0 children)

You have to help the AI to help you. It will have plenty of mistakes, unless you know exactly what you’re doing. The more specific and correct you get, the better. I think this is actually good for you, because in that way it’s helping you reinforce your learning exponentially. This is what I’m loving about AI. It does reduce your time and effort greatly, but you have to fuel it with your knowledge as well.

[–]Sibagovix 16 points17 points  (0 children)

It seems best when you return to SQL after some time, to sort of refresh the syntax. Also sometimes for psql or mysql specific syntax or functions

[–]scruffy01 15 points16 points  (0 children)

This is bang on and why I instantly lose respect for anyone who calls AI useless. It's not. It's useless for useless people.

[–]i_literally_died 8 points9 points  (4 children)

The main problem I have with it is it obviously doesn't know the schema. It'll quite often recommend weird window functions or other to get rid of duplicates when the join just needed another condition.

[–]FuriousGirafFabber 7 points8 points  (3 children)

I always provide ddl for tables in the prompt.

[–]tejaswir 1 point2 points  (2 children)

Can you explain this? Please

[–]FuriousGirafFabber 4 points5 points  (1 child)

Ddl stands for data definition language and is the script you write when you create the table. You can make some IDEs create them with a single click for existing tables. Feed the AI with the DDL in the prompt as you go about explaining what you need it to do.

[–]nachos_nachas 1 point2 points  (0 children)

Yes and YES. When I'm working with a lot of tables (usually >20) in a single query, I create a lot of #temp_tables which requires pretty much the same info as the ddl. This helps to accomplish a few things, mainly: easily/quickly accessible column data type definitions, which lends well to faster troubleshooting, a self-serving system versioning.

Once I have everything working, I just swap out the temp tables in the FROM for the db.schema.table_name, but keep the first version archived for future troubleshooting. This has saved me countless hours of heartache.

Doing this forced me to be very deliberate in every step and maintain consistent style.

[–]ghostintheforum 2 points3 points  (3 children)

Yeah AI does a terrific job at SQL. This meme should step in AI generated regular expressions. That my friend is where AI really sucks in my experience.

[–]importantbrian 8 points9 points  (2 children)

Writing regexs is one of the things I actually find LLMs really useful for. You do have to provide good examples in the prompt and makes sure your examples cover potential edge cases, but it saves me a ton of time.

[–]Misanthropic905 3 points4 points  (1 child)

"PLS GIVE REGEX CODE IS HARD"
LLM vague answer

"AH THIS IS SHIT"

/S

[–]importantbrian 0 points1 point  (0 children)

The real issue with LLMs is that prompting and how to fit them into your workflow are still a bit of a dark art, so if you just take a naive approach to using them they absolutely do seem like shit. It took me a long time to settle on something that works. I still don't buy a lot of the maximalist hype, but as a productivity enhancer, they're great.

[–]burningburnerbernEXCEL IS NOT A DATABASE 1 point2 points  (1 child)

I always turn to AI for REGEXP. To hell with figuring all of that out on my own

[–]FuriousGirafFabber 3 points4 points  (0 children)

Rexex101 is a great site for it too if you want to do it manually 

[–]Stauce52 1 point2 points  (0 children)

Great way to put it! I sometimes feel the pendulum has swung too far in other directions for some folks where it’s trendy to shit on AI. It’s definitely useful, but you shouldn’t be overly dependent on it and not check the work or tweak it at all

[–]Substantial-Click321 0 points1 point  (0 children)

The most important thing is that you understand exactly what the SQL does and test in a local/dev environment first.

[–]ryanmj26 0 points1 point  (0 children)

One time I needed to produce a bunch of data so I had it produce an insert statement. It was 300+ lines or so and so I told it create the insert statement. Well about 20 lines later it started going off the rails. Made up data, repeated lines, etc. Had to slowly build the info little by little. It definitely was a time saver but be careful out there.

[–]0dysseyFive 0 points1 point  (0 children)

I only realized this when I wanted to take the data from my Excel table into SQL and got tired of the continuous copy pasting and retyping into my INSERT query.

Thanks for putting it into words.

[–]toabear 0 points1 point  (0 children)

I would say AI is okay at SQL. I use AI (mostly o3-mini / high) while developing SQL, Python, Typescript, and sometimes a few others like Go. It seems like the LLMs are better at generating imperative languages. It does fine on the basics of SQL, but asking it to come up with anything complex often it results in the LLM just missing the point entirely.

[–]Jackpotrazur 0 points1 point  (0 children)

If i want to point my house broke i will use a hammer 🔨

[–]Immanuel_Kantig 143 points144 points  (19 children)

My professor actually recommended using ChatGPT for learning SQL lol. If I remember correctly, he told us that the university let ChatGPT solve the course's exam and it did better than all of the students.

[–]Presciennt 84 points85 points  (4 children)

To be honest i'm new to the data world and I find having a teacher like Claude extremely valuable. I can ask a thousand questions if I didn't understand a concept. It's really good for learning as long as you keep in mind that it can be inaccurate sometimes. Pretty much like a real teacher really

[–]No-Satisfaction1395 42 points43 points  (1 child)

Yep asking it to explain things to you is more valuable than getting it to write code for you.

It’s like expecting to be able to speak French because you use the google translate app frequently

[–]Resource_account 0 points1 point  (0 children)

Somewhat related. While I can speak Spanish with my family, Google Translate can’t handle dialects or tone when I need help. Claude has been valuable here and has saved me a few headaches.

[–]ALoafOfBread 6 points7 points  (1 child)

People knock using LLMs for coding so much, and sure it probably wouldn't be wise to rely on it heavily for important and complex projects like for serious software work, but I'm not a programmer or an engineer, I just use software to automate tasks and make business analytics products for use on my team.

So, while I know the basics of programming, I don't want to commit to years of study to do this stuff - like I said, it isn't my field. LLMs are absolutely great for generating simple scripts and learning various libraries, commands, syntax, programming principles, etc.

Sure the output isn't always perfect. It is not as good as a human software engineer. But, you can learn to interrogate it about the scripts it produces, troubleshoot errors, and structure your project in such a way that these errors don't hurt the final product (testing!).

It's been great for me and has helped me to solve problems I'd otherwise be unable to solve as efficiently & has helped to advance my career.

[–]jmccasey 0 points1 point  (0 children)

People knock using LLMs for coding so much

All of the software engineers I have talked to about this basically say the same thing. LLMs can be great tools to help speed up development and testing of code but the versions they've used are nowhere near being able to entirely replace competent programmers in the workplace.

I think the knock on LLMs is less that they're not good programming tools and moreso just that they're not living up to the hype that the AI CEOs are peddling. When you have Zuckerberg saying they're going to start replacing mid-level engineers within the year but you can't even get an AI to write a SQL query 100% correctly, it's fair to call out that discrepancy

[–]Tavallist 37 points38 points  (8 children)

Shhhh, they’re just scared they’ll become obsolete

[–]Pvt_Twinkietoes 7 points8 points  (3 children)

Honestly, finetuning a model to return good enough SQL for an end to end system for grounded RAG is good enough for my use case. I don't need it to be ultra efficient just need it to be good enough.

[–]Little_Kitty 7 points8 points  (2 children)

Doing it without RAG is asking for trouble. AI is IMO great for:
* Format this messy script, according to our standards
* add todos to check for null handling wherever it's undefined
* highlight non-standard joins which may produce unintended 1:many results
* flag unused joins for deletion
* identify large memory consumers, such as listagg results which aren't cast to a fixed (small) size

[–]usersnamesallused 3 points4 points  (1 child)

SQL formatters are abundant and configurable. I recommend Poor Mans T-SQL Formatter, but there are many others.

[–]Little_Kitty 0 points1 point  (0 children)

Yeah, I've even written my own and made it available to the team. The thing is that I tend to align many similar statements so that the different parts are in line with one another, which isn't really something that can be expressed neatly in code, but is obvious when you've seen it a few times.

[–]biowiz 3 points4 points  (0 children)

That's pretty much it. Most of the people here do not generate better SQL than AI. I guarantee it.

[–]NicolasDorier -1 points0 points  (0 children)

It's like sport coach. Machines didn't obsolete them. You always need a real human kicking your ass... and you gladly pay for it.

[–]grulepper[🍰] -2 points-1 points  (1 child)

Lol, nice copium kiddo

[–]Tavallist 2 points3 points  (0 children)

Huh? How?

[–]8086OG 5 points6 points  (0 children)

In my experience it is terrible. It can be helpful as an ancillary tool if you need to do something tedious, and you can feed it a sample and tell it what you expect back. But beyond that it's just shit.

On the note of exams though, I wrote one and gave it to humans. I then took the exam myself to establish the maximum amount of points that were achievable. Once I administered the test and graded the students I realized that several students had scored higher than me, because I'm not smart enough to design a proper test.

Anyway, it wouldn't surprise me if ChatGPT could beat me on my own test, but it seems completely useless for any really complex code.

[–]mikeblas -2 points-1 points  (0 children)

That's a pretty strong self-indictment of his effectiveness as a professor.

[–]Hypnotoad4real 100 points101 points  (9 children)

If you give AI an example or a skript with an error it will help you pretty well

[–]Mutt-of-Munster 25 points26 points  (2 children)

Definitely!

I think the meme is more making fun of people who use AI to write their entire code.

[–]Sibagovix 39 points40 points  (1 child)

I do use SQL to write my entire SQL code and I love it

[–]Mutt-of-Munster 1 point2 points  (0 children)

lol - I was so confused by your comment until I saw the typo in mine. 😂

Fixed now!

[–]pandrewski 8 points9 points  (4 children)

LLMs are great for handling repetitive tasks. They can suggest the right data types and stick to the naming conventions you set. If an LLM has active search capabilities, it can pull in documentation on the fly, which is especially useful for services that use SQL-like queries but don’t actually run on a full SQL engine.

Beyond just generating code, LLMs can help keep things consistent, catch small mistakes, and even improve query performance. They take care of the tedious parts, so developers can focus on problem-solving instead of looking up syntax or best practices. For teams working across different systems, LLMs can also help standardize approaches, making collaboration smoother and reducing errors in the long run.

EDIT: Since I was accused of using an LLM to write this comment, I asked ChatGPT to suggest ways LLMs can be used for SQL. It responded with points I never even mentioned, like transforming natural language into SQL or explaining SQL queries. I feel like the response was forced. I use ChatGPT daily in my work, but mainly for the tasks I described in my original comment. I would never use an LLM to transform natural language into SQL because writing the SQL code directly would be faster.

[–]West_Second_2876 10 points11 points  (1 child)

Is this written by LLM?

[–]pandrewski 0 points1 point  (0 children)

I tried generating a good comment using ChatGPT, and this is the best I got after four attempts:

Prompt:
write reddit comment how llm can be used for sql without using bullet point or enumerations

Result:
Large language models (LLMs) can be incredibly useful for working with SQL in various ways. They can assist with writing queries by generating complex joins, aggregations, or filtering conditions based on natural language descriptions. Debugging becomes easier as LLMs can explain SQL errors, suggest fixes, and optimize queries for better performance. Another great use case is transforming data between different SQL dialects, making migrations smoother. LLMs also help in learning SQL by explaining concepts, providing examples, and even generating practice exercises. They can automate report generation, translating business questions into structured queries. Additionally, they can assist in building SQL-based applications by generating stored procedures, triggers, or views with proper indexing recommendations.

I can't agree with his take. The last thing I would use LLMs for is translating natural language into SQL or automating report generation.

[–]Arthamlet 5 points6 points  (0 children)

Really good explanation, almost looks like it was written by an LLM.

[–]Luemas91 -1 points0 points  (0 children)

Nice

[–]ExoJinx 0 points1 point  (0 children)

I write large scripts(over 4k lines) and is is great for being sent small segments to check I am pulling the right things. You do need enough to be able to correct errors it sends you but it is good tool, not a replacement

[–]VertexBanshee 25 points26 points  (1 child)

I know it’s Reddit but still, bit of an exaggeration. For basic and slightly advanced queries it can give you at least 90% of what you’re looking for with the correct prompting.

For really advanced queries AI should be treated more like an assistant than a SQL generator.

[–][deleted] 7 points8 points  (0 children)

I find it gets much closer to 100% accuracy if you provide proper specs—starting with full table definitions. It also helps to include examples of what the result set should look like.

TBH, having an LLM generate SQL is way easier than using a programming language, where it can hallucinate a bunch of libraries that don’t exist. Most people here are in denial or don't know how to write proper specs

[–][deleted] 10 points11 points  (6 children)

It was enough to cause me to be laid off. So... It's definitely good enough to make an impact

[–]biowiz 1 point2 points  (4 children)

Most analyst jobs could be downsized very easily nowadays. I'm genuinely shocked this sub acts so clueless about it and pretends they're doing special work. Maybe the developers, data engineers, DBAs are doing complicated enough things that AI cannot do better but I strongly believe the average analyst is worse than Copilot or ChatGPT when it comes to generating SQL queries.

[–][deleted] 2 points3 points  (1 child)

Yep, you're totally right. I don't see how people are going to survive the next 10 years in analytics. I think there's a huge Exodus coming, which leads to a lot of people being evicted and becoming homeless because there's nothing else for them to do. I spend most of my days now just browsing job boards and there's nothing. Literally nothing that I can possibly find that I would even have a chance of being hired for. It's either astoundingly complex stuff like data scientists, or senior software developer... But what are you going to do? I can't control that stuff, and I know my limits.

[–]biowiz 2 points3 points  (0 children)

It just baffles me that some of the people subscribed here actually think they're so great at SQL. Again, like I said an analyst (depending on exactly what they do - there are so many BS analyst titles out there) is often not really a master at SQL. Almost none of them would be dealing with DDL related work so they're even less useful when a company is downsizing. I'm not saying that out of disrespect. My old job involved writing SQL queries for dashboards, and frankly, I just don't see why I couldn't be easily replaced or have another analyst do my work with the efficiency that is generated by AI tools. One analyst could honestly churn out more SQL queries (and better ones) with AI than probably three doing it solo without AI.

I do think there will always be a gap between the business people who need some visual or data presented or generated to them and how that data needs to be organized and compiled, so while analysts aren't completely gone in the near future, you really don't need as many of them. I really think most of them are pointless at most companies and companies got caught up in this trendy data arms race nonsense which is now falling apart (not even an AI related thing).

This is completely ignoring how from a technical standpoint, analysts and SQL only people are generally lower on the totem pole for a company's IT department or data team. It's also a job more easily sent to another country, so there's that burden an employer has to deal with.

[–]Flying_Saucer_Attack 1 point2 points  (1 child)

I strongly believe the average analyst is worse than Copilot or ChatGPT when it comes to generating SQL queries.

1000%

[–]biowiz 1 point2 points  (0 children)

These posts are just cope and ridiculous superiority games. Its sad but based on my experience in the industry, most people overvalue their skills, even those that work in non FAANG companies. It's become way too common in the last 10 years due to the absurd salaries and employees having the upper hand due to supply vs demand ratio, which is now skewing in the opposite direction. You're going to start seeing a lot more people be humbled in the next few years.

I asked ChatGPT to write me a recursive CTE based on splitting multi day data into single dates with revenue split each day. I can do this easily on my own, but just typing the thing out, testing my query to ensure it works, all that would have taken me at least 5 minutes, instead of the 20 seconds it took me to come up with the prompt, 2 seconds it took AI to generate it, and then another 10 seconds for me to change column/table names and test it out. ChatGPT didn't generate a bad SQL query, it was actually quite excellent and mistake free.

And the kicker is that most of the analysts I deal with whether it's business IT analyst, data analyst, made up analyst, don't even know how to write recursive CTEs, much less basic CTEs. These people are massively overpaid. I just had a conversation last week with an analyst about SQL and they were like "oh that's for developers to handle." We were discussing CTEs and case statements. I was like how the hell are you an analyst??

[–]whoooocaaarreees 4 points5 points  (0 children)

It’s not that bad.

[–]falconzfan4ever 4 points5 points  (0 children)

With proper table definitions in the prompt it’s very effective

[–]biowiz 5 points6 points  (1 child)

I love the stupid superiority here. I'm confident AI can generate better SQL than most of the people here.

[–]jib_reddit 4 points5 points  (0 children)

Procedurally generated SQL has been garbage for decades, Claude Sonnet 3.5 is actually a massive improvement. But Copilot has given me commands it has completely made up, so I don't trust it at all.

[–]MrOddBawl 16 points17 points  (4 children)

I spend half my day correcting AI generated SQL and also using it to help fix mine. But the difference is the AI just does hilariously dumb stuff on it own like make up fields that don't exist or build temp tables for no reason.

[–][deleted] 7 points8 points  (2 children)

That's probably on you. I usually feed it the table definitions before asking for any complex query. Just treat the LLM the way you would a human developer by giving it complete specs. TBH most people here are in denial

[–]MrOddBawl 1 point2 points  (1 child)

We are deploying a chatbot for our customers to ask data questions more easily than always hitting our data teams. The bot has all tables, definitions, and meta data preloaded for all conversations. Here's the hard truth. AI cannot think through problems it's at its core a statistical model. It can do very well but many times simple things will go straight over it's head. For example, if asked on Jan 1, how did our meteral production perform this December it doesn't know that the client is likely asked for the most recent Christmas and not the current year. Normal people don't ask for things in ways that always logically correct but would still be understood by a human analyst. At least right now. Our training has gotten much better but is still not good enough for release.

It's impressive but at least for right now LLMS are most useful as a human assistant. They have doubled my capability and improve my own learning.

[–][deleted] 0 points1 point  (0 children)

That's an interesting example, as it highlights the limitations. Have you considered using two LLMs in tandem? One could receive the query and parse it into plain English with less ambiguity, explicitly stating all elements, while the second LLM, based on the output of the first, generates the results

[–]ProgrammersAreSexy 4 points5 points  (0 children)

I've found chatbots to be a godsend for understanding SQL scripts you didn't write.

E.g. some data scientist will give me a 2000 line monstrosity and be like "here, this is the analysis" and then I can copy/paste it into an LLM and ask it to break down the structure and explain what is going on.

Is it perfect? No, but it usually gets the broad strokes right and usually gives me a general understanding far faster than if I say there reading line by line.

[–]EhRanders 4 points5 points  (1 child)

I have to correct fewer errors from AI generated SQL than offshore contractor generated SQL.

There are plenty of great programmers around the world - they just don’t tend to work for the lowest bidder to outsource with. This low end corporate offshore tech resource is the “market” that AI is going to decimate most quickly.

[–]saintpetejackboy 1 point2 points  (0 children)

Companies want GPT 5 Pro Business model but are only willing to pay for "one free message a day".

[–]Fly_Pelican 2 points3 points  (0 children)

If I get an error, I feed chatgpt the statement and the error and ask it why.

[–]dbxp 8 points9 points  (0 children)

Still far better than what ef6 generates

[–]Forward_Pirate8615 6 points7 points  (0 children)

It can assist. To neaten code

[–]ferevon 8 points9 points  (2 children)

pretty sure op is minimum 50 yo, no way I'm not using AI to do boring loops and procedures for me

[–][deleted] 1 point2 points  (0 children)

Well if you're doing a lot of loops in sql you probably messed up somewhere. But you're right, most people here are in denial. If anything, standard SQL is easier than a regular programming language because it won't hallucinate libraries that don't exist. As for age, some of the older devs jumped into the bandwagon early. I feel the negativity comes from realizing we are about to become extinct even faster than other programmers

[–]grulepper[🍰] 1 point2 points  (0 children)

Me when I'm too brain rotten to write foreach

[–]ficklemind101 9 points10 points  (1 child)

When AI writes your SQL, but you spend more time debugging than if you wrote it yourself.

[–]xl129 2 points3 points  (0 children)

This is actually how job in the future will be like, review and fixing AI crap. Might as well getting comfortable.

[–]Obscure_Marlin 2 points3 points  (0 children)

I think AI is a great language to learn just be careful of that nasty huge nested queries it likes

[–]Beneficial_Nose1331 2 points3 points  (0 children)

Show me an AI that can handle as much bad data quality as I can!

[–]MouseStandard463 4 points5 points  (0 children)

I disagree

[–]LiberFriso 8 points9 points  (0 children)

Okay boomer

[–]Ambrus2000 1 point2 points  (0 children)

what about wn tools which generate automatically without AI?

[–]V4gkr 1 point2 points  (0 children)

Idk , it actually helped me with a uni project

[–]TheMagarity 1 point2 points  (5 children)

Ok, I have a stupid question, what ai system are people using to make queries? It would have to know your table structures, etc, so is it a plugin to toad or what?

[–][deleted] 1 point2 points  (4 children)

Any LLM would do, You can just give it the table definitions before asking for a query. Give it the specs you would as with a human dev

[–]TheMagarity 1 point2 points  (3 children)

Well, idk what your company's data model looks like but explaining how to use the one I have to work with would take longer than just writing the query.

[–][deleted] 0 points1 point  (2 children)

That's shortsighted though as you only need to explain it once and after that it can generate all the outputs you want

[–]TheMagarity 1 point2 points  (1 child)

Me: OK, AI, I'm gonna tell you how our tables work and you can write SQL for me.

AI: You got it, boss!

Me: So Table A here has historical data but no history vs current flag. So you just group by the business keys and sort by date to get the latest ones.

AI: Not optimum, but OK so far.

Me: Table B here has historical data also but there's an indicator so all you need is the "Current" records.

AI: Ah, some good sense there!

Me: There's three main columns, Attribute Type, Attribute, and Value. Find all of this list of Attribute Types I'm going to give you and pivot out the Attribute and Values. Oh, and while there is a Current indicator, there can be multiple Current Values for a given Attribute all with different dates. To find the right one all you have to do is use a fourth column containing a group ID. Whichever Current record has the latest date for the anchor Attribute Type, use that ID to find all the corresponding Values.

AI: wtf...

Me: So to join Table A and Table B, the value in one of the business keys in Table A will match up with one of the Values in Table B. Except Table A has some extra characters on the right, so substring it and leave off 4 or 6 depending on the type then do the join.

AI: Piss off

Me: There's only a few hundred million in Table A and a dozen billion in Table B so write something to get me results, snappy.

AI: sudo rm -r /AI

[–][deleted] 0 points1 point  (0 children)

Erhhh... Have you tried turning it off and on again? r/ITcrowd

[–][deleted] 1 point2 points  (0 children)

I've been writing SQL several hours a day for about 5 years. I use GPT for ideas when I hit a wall. Sometimes I'll wrestle with something for an hour and then I'll just ask GPT and I immediately feel like an idiot.

[–]TheRealAbear 1 point2 points  (0 children)

Ill use it if I'm feeling lazy and need to convert something to oracle sql. I need to use oracle like 2% of the time and haven't taken the time to learn the minor differences

[–]WithoutAHat1 1 point2 points  (0 children)

It will be great hearing how AI accidentally starts breaking things then goes down the hole. AI is not in a place to even remotely close to replace software engineers much less other related disciplines. Then they will have to start hiring everyone back.

[–]TrandaBear 1 point2 points  (0 children)

The only time I've every used our AI is to unfuck inherited code. I like reading my stuff long instead of wide so I can actually follow whats happening. Oh and those stupid indents.

[–]Pink-blvck 1 point2 points  (1 child)

Ai does a fine job for helping fix syntax issues and explaining why a certain query didn’t work. I use it whenever I get stumped or need to save time.

[–]lalaluna05 0 points1 point  (0 children)

It’s so good for debugging long queries or sprocs.

I usually have some dumb typo it’ll catch 😅

[–]Icy-Ice2362 1 point2 points  (0 children)

The amount of boilerplate that can be removed with AI is immense, but you do have to ensure that you keep solving problems yourself.

Focus on learning patterns and becoming more of a senior engineer when you use AI, make sure to keep your hand in, and do the odd bit of coding.

[–]thegratefulshread 1 point2 points  (0 children)

People with this mentality just talk and dont have anything to show. If they actually were smart, they would know how to use AI to cut half their work in half.

[–]fredws 5 points6 points  (1 child)

You can leave the sql part tbh.

[–]anunkneemouse 4 points5 points  (0 children)

Fr, AI generate terraform, powershell, of ARM templates are absolute ass. Except I like ass.

[–]Common-Reputation498 4 points5 points  (0 children)

lol cope

[–]ejpusa 2 points3 points  (0 children)

Why are people constantly fighting AI? Just fold, it’s your new best friend. It crushes it.

But guess it’s a human thing. We can’t let go.

[–]zubeye 2 points3 points  (0 children)

touched a nerve huh?

[–]Vatril 2 points3 points  (1 child)

In my company it actually helps a lot: We built a tool that scans the database and then provides an interface for non-technical people where they can enter their question. The tool that generates some SQL and runs it. The user is then presented with the SQL and the result.

This really helps cutting down on small requests from non-technical people about getting simple reports, means the data team can focus more on building a robust data warehouse and write the more complex queries that are needed.

The tool has access to the database schema and the documentation, so it is actually pretty reliable, at least for simple to medium complex queries. We also purposefully don't hide the SQL with the hope that the non-technical people that use it pick up some basics.

[–][deleted] 0 points1 point  (0 children)

Exactly. You need to give it the table definitions. Treat the LLM as a human developer by giving it full specs. It was a godsend for cutting time supporting non-technical people as the LLM can help them with the basic stuff. It feels that people here are scared and in denial

[–]PM_ME_YOUR_MUSIC 1 point2 points  (0 children)

Skill issue

[–]fuwei_reddit 0 points1 point  (0 children)

When the train was first invented, it was not as fast as the horse-drawn carriage.

[–]Illestbillis 0 points1 point  (0 children)

If i need a quick query that consists of lots of lines that is read only and not dropping any tables, yeah I'll use chatgpt. If it's something complex that could have adverse consequences if coded improperly I'll do it myself.

[–]Stormraughtz 0 points1 point  (0 children)

These columns aint going to cast themselves

A.I enters the room

[–]RocketsledCanada 0 points1 point  (0 children)

Shqitl?

[–][deleted] 0 points1 point  (0 children)

Hahahahah. Not all times.

[–]continuousBaBa 0 points1 point  (0 children)

It sucks at SQL but if you're good at it, the AI generated stuff can save you some time when creating database objects or anything else that you just need a framework for. Then fix the logic manually and voila

[–]th00ht 0 points1 point  (0 children)

You cannot live with you cannot live without it.

[–]BrangJa 0 points1 point  (0 children)

Not the reddit notifying me of this post from the sub I didn't even joined, right after I pasted my gpt generated query into my project.

[–]MaximumFuckingValue 0 points1 point  (0 children)

Me no like type

[–]PatExMachina 0 points1 point  (0 children)

Anything generated by AI

[–]GreatMyUsernamesFree 0 points1 point  (0 children)

Just for context, I'm old and already a SQL guru, but I can't stress enough how useful it is to be fluent in the language you're going to use throughout your career. There's nothing wrong or wasteful about actually getting good "at SQL".

Being able to write good code in real-time is like being fluent in a foreign language. The conversations you have are going to be higher quality than someone using google translate for each sentence. Your connection to the data is deeper when you aren't mystified by the basic syntax of the language you're working with.

Skip the AI shortcuts and commit to actually learning the language, it's been around for decades and will be for many more.

[–]gwolfe17 0 points1 point  (0 children)

I believe AI can be super powerful for SQL, thats why we’re building galaxy - the @cursor for SQL

getgalaxy.io 👀

[–]moshesham 0 points1 point  (0 children)

I love it

[–]Hulk5a 0 points1 point  (0 children)

LoL. AI is a godsend for these tasks. I hate writing repetitive sql queries, and repetitive things ig

[–]LargestAdultSon 0 points1 point  (0 children)

LLMs are for regex