sql_from_english
Convert plain-English database questions into working SQL queries — with explanation and optimization notes. Describe what you want to pull from your database and get production-ready SQL. Handles JOINs, aggregations, subqueries, window functions. Use when user says 'write a query to', 'get me all X where Y', 'SQL for', 'how do I query'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Your table definitions or schema description (helps accuracy enormously). E.g. 'users(id, email, plan, created_at), orders(id, user_id, amount, created_at)'. | |
| dialect | No | SQL dialect: postgresql, mysql, sqlite, mssql, bigquery, snowflake. Default: postgresql. | |
| request | Yes | What you want to query in plain English. E.g. 'Get the top 10 customers by total spend in the last 30 days, excluding free tier accounts'. | |
| optimize | No | Include index suggestions and query optimization notes. Default: true. |