AI Chat
Overview
The AI Chat Interface is your intelligent assistant for data exploration. Ask questions in natural language, get SQL query suggestions, explore database schemas, and troubleshoot issues—all without leaving your workspace.
Accessing the Chat Panel
The AI assistant panel is located on the right side of the AI Studio interface. It remains accessible regardless of which script tab you're working in.

What You Can Ask
1. Natural Language to SQL
Transform business questions into executable SQL queries.
Examples:
- "Show me the top 10 customers by revenue"
- "Find all orders from last month"
- "What are the average sales by region?"
- "List products that haven't been ordered in 90 days"
How it works:
- Type your question in plain English
- AI analyzes your datasource schema
- Generates optimized SQL query
- Provides explanation of the logic
2. Schema Exploration
Understand your database structure without writing queries.
Examples:
- "What columns are in the orders table?"
- "How are customers and orders tables related?"
- "What's the structure of the products table?"
- "Show me all tables in this database"
- "What are the primary and foreign keys in the sales table?"
Benefits:
- Discover available data without manual documentation lookup
- Understand table relationships and dependencies
- Learn data types and constraints
- Identify join opportunities
3. Query Optimization & Debugging
Get help improving performance and fixing errors.
Examples:
- "Help me optimize this slow query"
- "Why am I getting a syntax error?"
- "How can I join these three tables?"
- "This query is taking too long, what's wrong?"
- "How do I add an index to improve performance?"
AI Capabilities:
- Identifies missing indexes
- Suggests query restructuring
- Explains error messages in plain language
- Recommends best practices for your datasource type
Using AI-Generated SQL
Step 1: Ask Your Question
Type your question in the chat panel and press Enter.
Step 2: Review AI Response
The AI will provide:
- Generated SQL code in a formatted code block
- Explanation of the query logic
- Any relevant notes or recommendations
Step 3: Insert into Editor
Click the insert button below the generated SQL to add it to your active script tab.
Step 4: Review and Modify
- Check the inserted code in the SQL editor
- Verify it matches your requirements
- Make any necessary adjustments
- Ensure datasource-specific syntax is correct
Step 5: Execute
Click EXECUTE to run the query and view results.
Chat Interface Features
Conversation History
The chat maintains context throughout your session, allowing for follow-up questions.