Writing Queries
The Query Panel
When you open Configuration on a chart portlet and select Query, you’ll see the Query Panel. At the top of this panel, there are three icons representing different tabs: AI Assistant, SQL, and Results. To the right of these tabs, you’ll find the Query Builder button. The AI Assistant is selected by default.

AI Assistant (Chat Bubble Icon)
Purpose: Allows you to type in natural language requests (e.g., “Solana price evolution from January 2023 to December 2024”).
How It Works: After typing your request, click Send. The AI Assistant automatically converts your plain English prompt into an SQL query behind the scenes.
When to Use: Ideal for users who aren’t comfortable writing SQL directly or prefer a quick, conversational approach to querying data.

SQL (SQL Icon)
Purpose: Lets you write or edit queries manually using SQL syntax.
How It Works: Type or paste your SQL statement into the editor, then run the query to see the results.
When to Use: Best for advanced users who need precise control over the query or want to add complex filters and joins.

Results (Table Icon)
Purpose: Displays the raw query results in a tabular format.
How It Works: After a query runs (via AI Assistant or manual SQL), switch to this view to inspect rows and columns of returned data.
When to Use: Perfect for verifying data correctness or exploring results before visualizing them in a chart.

Query Builder (Button)
Purpose: Opens a full-screen visual interface for constructing queries;
How It Works: When clicked, the Query Builder expands to a dedicated screen where you can visually select tables, columns, and filters. This interactive environment automatically generates the corresponding SQL code based on your selections.
When to Use: deal for users who want more control over query construction.
In addition to these items, you see other controls like Auto-Execute (toggles whether queries run automatically as you type).
💡 Tip: Each method provides a different level of flexibility, so you can choose the one that best fits your workflow.
Last updated