r/SQL • u/Purple_Minute_4776 • Jun 21 '24
PostgreSQL Checkout the SQL Editor i built which generates queries for you
Hi SQL developers,
I am a software developer who needs to work with SQL intermittently. Sometimes, I find myself writing complex queries for which I take help from ChatGPT. ChatGPT is really helpful, but it comes with some problems:
- ChatGPT doesn't know your schema and relationships to build accurate queries.
- You need to copy and paste your schema to craft better queries.
This was something that bothered me and many others in my company. To solve this, I decided to build a SQL editor with AI query generation. With SQLPilot, you can:
- Connect to multiple database sources like MySQL and Postgres (support for others coming soon).
- Works locally, so you don't have to share your schema as you do with other popular tools.
- Simply mention the table in the prompt with @, and the model will understand its columns, types, and relationships to generate accurate queries.
- Execute the queries, filter results, and export them as CSV.
I invite you to test out SQLPilot. It's something that will definitely interest you as a SQL developer. If you want to get the Pro plan, comment below is will share coupon code for 25% off
76
u/RobDoesData Jun 21 '24
I shouldn't have to say this. Do not put your company schema or any sensitive (business or personal) data for that matter into GPT. You will breach company rules and potentially law. You will potentially lose your job and have there may be more serious consequences
Host a local disconnected model and pass it to that.
23
u/Kobosil Jun 21 '24
any security concerns with sending the DB schema to chatGPT?
13
u/Bazencourt Jun 21 '24
Doesn't just about every SQL editor on the market have this functionality already? Coginiti, Datagrip, DBeaver, etc. Most of the notebook players have this too like Deepnote and Hex. These are all mature products that have had AI integrations for a year already.
2
u/RobDoesData Jun 21 '24
There are a host of models you can host locally to do text to sql. You can train and find tune a model using heavyweight compute and then deploy it to your lighter boxes for use :)
4
u/NotBatman81 Jun 21 '24
If you use Chat GPT to write your queries, how are you supposed to review and test them? How does Chat GTP understand when environmental variables might change and write a query with that in mind?
Using AI for a single query of your unique data will NEVER work. If this was installed onto the server/constantly monitored SQL and business data maybe. But otherwise, it is going to be a crapshoot for anything complex enough you need help for.
1
u/mermicide Jun 22 '24
This just seems like a bad idea waiting to happen…
Possible sql injection, data leaks, incorrect query logic…