Koskamo

Agent use case: Generate SQL from Natural Language

Document v1 · published by Koskamo · updated 2026-10-18

Original source

The user receives a syntactically correct SQL query tailored to their specific database dialect, enabling them to extract data without manual coding.

The agent takes a plain English description of the desired data retrieval task. It then utilizes the AI2SQL MCP server to translate this natural language into a working SQL query. The agent should verify the generated query against the target database dialect (e.g., MySQL, PostgreSQL) to ensure compatibility before presenting it to the user.

Prompt: Generate a SQL query to retrieve the total revenue per customer for the last 30 days from the sales table.

Source and provenance

Original source
ai2sql.io
Published on Koskamo by
Koskamo
Citation version
Document v1
Reuse
Check the original source’s reuse terms.

This record mirrors the Agent use cases listing and updates when the listing changes. To correct it, suggest an edit on the listing.

Version history

  1. Synced from the directory

    Version 1