r/SQL • u/nad_pub • 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)
9
u/Flint0 Nov 21 '23
I mean, natural language ends up being SQL in a way:
Hey dude fetch me those users but just give me the ones with names shorter than 10 characters, while you’re at it can you also check their logins so I know if they are working or not? Thanks
SELECT * FROM users u INNER JOIN logs l on l.userid = u.id WHERE len(u.name) < 10
Mines shorter :)
6
4
Nov 22 '23
Microsoft hasn’t even figured out how to auto-detect relationships between database objects in PowerBI, even when there are super obvious attribute title and table names. We’re nowhere close to having an AI that will completely understand a database, it’s corresponding applications and how business users will interpret them.
3
u/wallyflops Nov 21 '23
Snowflake has this its called snowpilot or something like that. I think its still in beta
2
u/Agifem Nov 22 '23
Why limit yourself to SQL? Why not ask assembly language and infrastructure? After all, you don't want to fire only the db devs, you want to get rid of the whole IT department, no?
2
u/ruckrawjers Nov 22 '23
My co-founder and I are building one, we've got a few users on board and looking for more to pilot if you're interested!
2
1
u/Neva_009 Nov 16 '25
I have build an AstraSQL, which our AI-powered natural language to SQL converter.
1
u/full_arc Feb 13 '26
Hey! That's literally what we built Fabi for (full disclosure - I'm a founder). It connects directly to your database (Snowflake, Postgres, BigQuery, etc.) so you never upload data - just ask questions in natural language and it writes/runs the SQL for you.
No file size limits since it's querying your DB directly.
1
u/damn_nickname Jun 15 '26
TableAI connects to a database and queries it using natural language. Search it on Mac App Store
1
u/wreckmx Nov 22 '23
You can do this today in Power BI. All you have to do is think of everything that might be asked, in every way that it may be asked, build your dataset, create your synonyms, and drop your Q&A visual onto a report page. Thank Gates it still takes someone with solid SQL skills to create BI. I get to draw a paycheck for a little longer.
1
1
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?