How to create a question in SQL mode
Write raw SQL queries to explore and analyze your Odoo data directly.
Navigate to Questions
Go to Configuration, then click on Questions. Create a new question and select your data source — Odoo or PostgreSQL. Then click on SQL to switch to SQL mode.
Full SQL power
You can write any SQL query you need — cross multiple models, join any table. The possibilities are endless.
Write your query
For this example, we'll write a simple query to visualize sales by status:
SELECT state, SUM(amount_total) FROM sale_order GROUP BY stateClick Execute — and there's your table, showing sales broken down by status.
Check your data types
Just like in the Question Builder, always check the data type of each column by clicking its header. In our example, state is recognized as text and the sum of total amount as decimal.
Add a visualization
Move on to Visualization and pick a chart type. For a status breakdown, a pie chart is particularly well-suited. As with all chart types, plenty of parameters are available to customize the display exactly to your needs.
Save and organize
Click Save As and give your question a name — for example, "Sales by Status". Then move it into the appropriate folder to keep your questions organized.
Clean, fast, and powerful
That's SQL mode in O'Dashboard. Write any query, visualize instantly, and organize your results.