Search Documentation

Search across all support articles and guides

Using the SQL Editor

Write and execute custom SQL queries directly in VexiData for advanced data analysis.

The SQL Editor allows you to write custom queries when you need more control than natural language provides. Access it from the sidebar menu.

Accessing the SQL Editor#

Open the SQL Editor

1

Open user menu

Click your avatar in the sidebar footer.

2

Select SQL Editor

Choose SQL Editor from the dropdown menu.

3

Select data source

Pick the database connection you want to query.

Writing Queries#

Write standard SQL for your database type. The editor provides syntax highlighting and auto-completion for table and column names.

sqlexample.sql
-- Example: Get top customers by revenue
SELECT 
  customer_name,
  SUM(order_total) as total_revenue
FROM orders
JOIN customers ON orders.customer_id = customers.id
GROUP BY customer_name
ORDER BY total_revenue DESC
LIMIT 10;

Best Practices

Always use LIMIT to prevent returning too many rows. Use the read-only database user for safety.

Working with Results#

Results appear in a table below the editor. You can:

- Sort columns by clicking headers
- Export to CSV
- Create a chart from the results
- Save the query for later use