In SQL mode, pick the data type from the selector above the Resources panel.

Switching the data type discards your SQL and your AI prompt. If you have already written or run something, you are asked to confirm first. Builder mode always uses OCSF Data.
Analytics is PostgreSQL
Analytics SQL is PostgreSQL, not Snowflake, so function names differ. Errors start with PG Query syntax error:, and the real Postgres message is at the end.
- A literal
%can be read as a parameter placeholder and cause a confusing error. Writemod(a, b), nota % b. - Columns in
ORDER BYmust also appear in theSELECTlist. information_schemacannot be queried. Use the Resources panel to see tables and columns.
For what each table holds and how to join them, see Analytics tables reference.
Generate a query and a chart
On Analytics, the prompt box generates both the SQL and a chart. Describe the metric you want and select Generate SQL & chart. The button shows each stage as it runs: Planning the query…, Writing SQL… and so on.

When the build finishes, the SQL is typed into the editor and run, and the chart appears in the Widgets area:

- Nothing is saved. Save the query, or add the chart to a dashboard, to keep it.
- Switching the data type, or opening a saved query, while a build is running cancels the build.
- A build that has not finished after 30 minutes is abandoned.
RAW Data has no AI generation yet; its prompt box is disabled with a Coming soon badge.