Earlier quoted context omitted.
I have a hell of a time just getting any LLM to write SQL queries that have things like window functions, aggregates and lateral left joins - even when shoving the entire database schema DDL into the context. It's so frustrating, it regularly makes me want to just quit the profession. Which is why I still just write most code by hand.
I write a lot of SQL and I haven't had these issues for months, even with smaller models. Opus can one shot most of my queries faster than I could type them. Instead of stuffing the context with DDL I suggest: 1. Reorganize your data warehouse. It needs to be easy to find the correct data. Make sure you use ELT clear layers, meaningful schemas, and have per-model documentation. This is a ton of work, but if done righ…
Same. SOTA models crush every SQL question I give them.