Hacker News new | ask | show | jobs
by AdieuToLogic 1146 days ago
>> the concern i would have here is that if you don't know SQL then you have no way of knowing whether or not the results are correct and if the results are wrong you have no way to debug the query.

> Correct, you probably should know SQL.

If your customers need to know SQL, presumably they also need to know the data architecture in order to verify correctness and/or fitness of purpose.

Assuming both of these preconditions are true, why would someone not just write the requisite SQL themself?

> Even if you have to do that, you can still save time and more importantly mental effort by letting AI help you, compared to writing all the SQL yourself.

Not really, at least in my experience. Staying "in the flow" is easier when writing SQL queries instead of having to:

1. Take time to think of a "good" ChatGPT request.

2. Review/test what was generated.

3. Take more time to refine the ChatGPT request to make it "better."

4. Goto 2 until a satisfactory SQL query is generated.

Contrast the above steps with:

1. Take time to determine what SQL query is needed.

2. Write the query.

3. Test the query.