SQL

Natural language to SQL query generation evaluates text-to-query fidelity and schema reasoning. This task is particularly relevant for analytics chat assistants and simplified database interfaces where users need to query data using natural language. Models must understand both the intent behind the question and the structure of the underlying database schema.

0
Duration
31s
Input Tokens
3199
Output Tokens
361
Cost
$0.00
Context
Input
Please delete any lessons that are still in draft and were created before 2022.
Expected output
DELETE FROM lessons WHERE is_draft = TRUE AND lesson_id IN (SELECT l.lesson_id FROM lessons l JOIN courses c ON l.course_id = c.course_id WHERE c.created_at < DATE '2022-01-01');
Model output
DELETE FROM lessons WHERE is_draft = TRUE AND created_at < '2022-01-01';