←back to thread

Getting AI to write good SQL

(cloud.google.com)
477 points richards | 3 comments | | HN request time: 0.001s | source
Show context
cloudking ◴[] No.44010100[source]
This is pretty simple in any foundation model, provide a well commented schema and ask for the query
replies(4): >>44010110 #>>44010243 #>>44010309 #>>44011095 #
1. tibbar ◴[] No.44010110[source]
Step 1: Your schema has thousands of tables and there aren't many comments.

Step 2...

replies(1): >>44010201 #
2. john2x ◴[] No.44010201[source]
Use AI to generate the comments of course
replies(1): >>44010381 #
3. cloudking ◴[] No.44010381[source]
Exactly, add any documentation you have about the app for more context too.