When should I use Raw Query instead of the query builder?
Use the query builder for filters, joins, and summaries you can set up with clicks. Reach for Raw Query when a question needs SQL the builder can't express, such as CTEs, window functions, or database-specific functions, or when you already have the SQL written. Draxlr AI can also write the SQL for you from a plain English question. Queries made all three ways are saved the same way and work the same on dashboards.
How do variables work in a Draxlr SQL query?
Wrap a name in double curly braces, for example WHERE EmployeeID = {{employeeId}}. Draxlr lists each variable beside the editor, where you choose its data type, such as Numeric or Text, and enter a value. Execute Query then runs the SQL with that value in place.
How do I filter a SQL query by a date range?
Add a date range variable as a whole condition, for example WHERE {{dateRange:orders.created_at}}, and set its type to Date or Date-time. The Variables panel then shows a date range picker with presets such as This Week and Last Month. Before the query runs, Draxlr replaces the variable with a start-and-end condition on that column.
How do I make a filter optional in a SQL query?
Wrap the condition in double square brackets, for example [[ WHERE orders.employee_id = {{ employeeId }} ]]. The section is included only when every variable inside it has a value, and left out otherwise, so the same query works with or without the filter.
Can dashboard filters pass values into my SQL?
Yes. Add a Raw SQL Query Variable filter to the dashboard, choose its data type (Text, Numeric, Boolean, Date & Time, Date, or Time), and map it to a variable in your query. Turn on multiple values when your SQL uses IN or NOT IN, for example WHERE EmployeeID IN ({{employeeIds}}). For a Date or Date & Time filter, turn on Use date range to drive a {{dateRange:column}} variable with a date range picker. When a viewer changes the filter, the connected dashboard elements rerun with the new values.
Which databases does the SQL editor work with?
The SQL editor works with every database Draxlr connects to, including PostgreSQL, MySQL, SQL Server, MariaDB, Supabase, PlanetScale, CockroachDB, YugabyteDB, Neon, BigQuery, Snowflake, ClickHouse, Redshift, and Databricks.
Can my customers write SQL inside my app?
Yes, with Full App Embed. It adds an analytics workspace to your product where each customer gets the dashboards you share with them, plus their own dashboards, a query builder, a SQL editor, and the AI assistant. Row-level security keeps each customer to their own data.