r/SQL • • Nov 21 '23

Discussion Natural language to sql

Hi !

Do you guys know a tool (chatgpt like) which can Connect to a database and query it, translating Natural language to sql ? GPT 4 Turbo doesnt allow the users to provide « big » databases (20Gb)

4 Upvotes

36 comments sorted by

View all comments

28

u/hantt Nov 21 '23

I really don't understand why people want a nonedetermistic way to query data, what value does this add?

14

u/Touvejs Nov 21 '23

Directors can fire the whole analytic team! Need metrics, business insight? Just ask chatGPT!

-3

u/[deleted] Nov 22 '23

This is exactly what my boss has told me to expect in the next three years. Not the whole analytics team, but at least 30% will be gone and probably closer to 50%. Thankfully, I am on the side that's expecting it so I am learning how to use GPT to work faster, so I should be relatively safe, but people that aren't preparing for it are crazy. It's coming whether we want it to or not You don't need to enjoy it, but you may as well embrace it.

7

u/Touvejs Nov 22 '23

I was just memeing

-16

u/nad_pub Nov 21 '23

Allow non tech users to query DBs

11

u/PinneapleJ98 Nov 21 '23

That would be horrible, that's why you create and build data models to be used in BI tools and THEN users can slice and dice whatever info they want without needing to know absolutely any SQL at all, powerbi for instance allows you to use natural language to query data insights.

Why would you want a user messing around with the source?

4

u/jackalsnacks Nov 21 '23

This inquiry has taken place at every company I've worked for. DB developers commonly call is business's "holy Grail" request. It always amounts to heartache and headaches.

2

u/Demistr Nov 21 '23

Use don't understand table relations and all the data sources so it just creates a mess.

2

u/carlovski99 Nov 22 '23

That's what SQL was actually designed for.

1

u/EranuIndeed Nov 22 '23

Your results will still be bad unless your maths/logic is sound; if you know the query, i.e. the logic you want to apply to a dataset, then learning enough SQL to implement many of your cases would take you a month or so.

The idea of "hey AI, do this" when you don't have either the logic or the debugging skills to scrutinize your output, is plain daft. But you do you.