11.8. Generating SQL Queries

Once you have your token, you can start using the AI2SQL Chatgpt plugin. Here's how:

With the AI2SQL Chatgpt plugin, you can generate SQL queries using natural language prompts. Here's how:

  1. Open the ChatGPT application where you have installed the AI2SQL plugin.

  2. Navigate to the AI2SQL plugin interface. This can typically be found in the 'Plugins' section of the application.

  3. Once you've opened the AI2SQL plugin, you'll see a field for entering your natural language prompt. For example, "Show me all users who have made a purchase in the last 30 days."

  4. After entering your prompt, click on the 'Generate SQL' button.

  5. The plugin will process your prompt and generate the corresponding SQL query.

  6. You can then run this query directly on your connected database by clicking on the 'Run Query' button.

Last updated