Invoice totals by month¶
Invoiced amount per month for the last two years.
Run it with the run_report tool, passing the report id monthly-invoice-totals. If the workspace has more than one connected entity, also pass the connection_id of the one you want, from list_entities.
Output columns¶
monthinvoice_countinvoiced
SQL¶
This is the exact query Kipper runs, against your own data and under your own permissions.
SELECT
date_trunc('month', txn_date) AS month,
count(*) AS invoice_count,
sum(total) AS invoiced
FROM v_ai_transactions
WHERE type = 'invoice'
AND txn_date >= current_date - INTERVAL '2 years'
GROUP BY 1
ORDER BY 1 DESC
Limits¶
- Capped at 100 rows.
- Covers one connected entity. To span every entity, use the
run_sqltool withall_entities=truerather than running the report once per entity. - Takes no parameters besides
connection_id, which picks the entity and is required when the workspace has more than one. Any date window a report uses is already part of the SQL above.