Turning a human question into correct SQL is a surprisingly hard problem. Large language models write valid syntax well but miss the logic easily: they confuse tables, join on the wrong key, forget GROUP BY, apply the wrong filters. Plain self-correction from execution results doesn't always help — a query can run fine and even return something plausible that still isn't what the user asked…