Code

Best AI Model for SQL Generation (2026)

Writing correct, performant SQL from natural-language prompts.

Writing correct, performant SQL from natural-language prompts. Scored by capability match + benchmark data + pricing.

#ModelScore
1Anthropic: Claude Opus 4.7 (batch)188
2Anthropic: Claude Sonnet 4.6 (batch)184
3Anthropic: Claude Sonnet 4.6183
4Anthropic: Claude Opus 4.7181
5Anthropic: Claude Opus 4.8 (batch)177

See full SQL Generation rankings →

The Model Movers Report

One email every Friday, built from this site's own rankings: the current top five by benchmark score, every model released in the last seven days, and one note worked out from that week's numbers. You can unsubscribe from any issue with one click.