Hacker News new | ask | show | jobs
by usaar333 1194 days ago
GPT-4 is simply outstanding at writing SQL statements. I made a bunch of examples with non-trivial customer revenue metrics assessments:

https://www.dropbox.com/s/hdhycf7l00d3sx8/gpt4_attempt_sql_q...

It can do basic math reasonably well (and this is achieving generation where GPT-3 failed). Interestingly, asking it to verify itself does resolve bugs sometimes. Managed to fix subtle count() denominator bugs and an inflation-adjustment error with not much hinting on my end.

You can only see it struggle really hard at the end when it tries normalizing month ranges correctly. It seemed to reach conceptual problems over how LAST_DAY() was being used and current debug itself.