Creating a Smart Chart gives you the full flexibility to compute the chart values but it can be tedious to always depend on a developer to code each new chart. The Live Query feature allows you to create a chart using SQL directly in the browser.
We can type our SQL query to compute the chart values. The returned columns must be named
value. If we put the character
? in our SQL query, it will automatically be replaced by the current record opened.
In the following example, we simply count the number of transactions per quarter.
SELECT DATE_TRUNC('quarter', created_at) AS key, COUNT(*) AS valueFROM transactionsWHERE beneficiary_company_id = ?GROUP BY key;
This Setup Guide step is now completed 🎉