Understand SQL
How queries are generated, what to check before running, and golden SQL.
How SQL is generated
Every question is translated into a SQL query against the connected data sources. The assistant uses the schema of your databases — tables, columns, and relationships — together with your company's glossary and domain context to write queries that match how your business actually talks about data.
You always stay in control: the generated query is shown to you before it runs, so you can review exactly what will be executed.
Read the query
The SQL view shows the full query with the tables and columns involved. Even if you are not a SQL expert, a quick scan tells you what data is being filtered, grouped, and aggregated. Anything you are unsure about can be asked back in the chat.
If a query does not quite do what you expected, you can ask the assistant to adjust it — for example "use the left join instead" or "round the average to two decimals". The query is regenerated and you can review it again.
Golden SQL
Approved, high-quality queries can be saved as golden SQL. Golden queries are reusable patterns that the assistant can lean on in the future, so results stay consistent across your team instead of being generated differently every time.
When a query is saved as golden SQL, it becomes a building block for future conversations: the assistant will prefer it when your question matches the pattern, which improves accuracy and speed for common analyses.