Settings

Theme

Do you want to use ChatGPT to generate SQL

1 points by tonnyxu 2 years ago · 1 comment · 1 min read


I'm a CEO, a former developer, and I think need it.

But don't know your idea.

throwitaway222 2 years ago

I typed this in chatgpt: I'm non-english and I need to write this out better: I'm a CEO, a former developer, and I think need it.

But don't know your idea.

And it gave back:

Certainly! It seems like you're expressing that you are a CEO, a former developer, and you believe you need something, but you're unsure about the specific idea. Here's a more refined expression:

"I serve as the CEO, bringing with me a background as a former developer. Currently, I find myself in a position where I recognize the need for something essential. However, I am open to suggestions and would appreciate your input on potential ideas."

Feel free to let me know if you would like any further adjustments or details!

Then I said, let's say I have a table users-fname,lname,id,email and another table messages: fromUserId,id,message,toUserId and I need to find all messages that user 1 sent to user two, in SQL

and ChatGPT replied with:

SELECT messages.* FROM messages JOIN users AS sender ON messages.fromUserId = sender.id JOIN users AS receiver ON messages.toUserId = receiver.id WHERE sender.id = 1 AND receiver.id = 2;

So the basic answer is, Yes you need ChatGPT, but for more than just SQL.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection