# Generate a SQL Notebook Using AI

If you choose the **'Generate Using AI'** option, follow these steps:

1. **Input Details:**
   * You’ll be prompted to input the following:
     * **Prompt**: Describe the objective of your notebook.
     * **Tables**: Select tables from the dropdown (multiple selections are allowed).
   * Once completed, click **'Generate'** to create the notebook.
2. **Navigating the AI-Generated Notebook:**
   * The generated notebook will display code blocks, with an **Analysis Introduction** at the start and an **Analysis Summary** at the end.
   * You can insert new SQL queries, text, or edit between steps as needed. All changes are automatically saved.
   * The notebook’s sidebar allows you to view and search through your database’s schema and tables.
3. **Working with Code Blocks:**
   * Each code block provides options to:
     * **Run the query**.
     * **Modify variable names**.
     * **Use AI Copilot** for suggestions (pencil icon).
     * **Hide, move up/down, or delete the step**.
4. **Additional Features:**
   * At the top of the notebook, you'll find CTAs to:
     * **Save** the notebook.
     * **Publish or Share** using the vertical ellipsis menu.
     * **Show variables** and **Run all code blocks**.
   * Explore the three tabs:
     * **Notebook** (default view).
     * **Storybook**: Displays the notebook's analysis in narrative form.
     * **Dashboard**: Allows for creating dashboards from generated metrics and charts.
