Skip to content

Totals by transaction type

How many of each document type there are, and what they add up to.

Run it with the run_report tool, passing the report id totals-by-type. If the workspace has more than one connected entity, also pass the connection_id of the one you want, from list_entities.

Output columns

  • type
  • document_count
  • total_amount

SQL

This is the exact query Kipper runs, against your own data and under your own permissions.

SELECT
    type,
    count(*) AS document_count,
    sum(total) AS total_amount
FROM v_ai_transactions
GROUP BY type
ORDER BY total_amount DESC NULLS LAST

Limits

  • Capped at 100 rows.
  • Covers one connected entity. To span every entity, use the run_sql tool with all_entities=true rather 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.