get_delivery_summary โ€” Delivery Summary

A single aggregate over delivery notes โ€” count, total value, min, max, and the date range.

This is a Named SQL Query (SAP /SQLQueries) โ€” dynamic aggregate SQL returning per-query rows, not a fixed Service Layer entity.

Delivery-summary report โ€” a single aggregate over delivery notes (outbound goods to customers). Returns one row with count, total_value, min_value, max_value, and the date range (date_from / date_to). Read-only. Reach for it when the user asks for a rollup or totals of deliveries โ€” “summarise our deliveries”, “total value of open deliveries”, “biggest and smallest delivery”. A no-match filter returns a single zero row, not an error.

Try these prompts

  • “summarise our deliveries”
  • “how many deliveries and what’s their total value?”
  • “total value of open deliveries for C001”

ื ืกื• ื’ื ื‘ืขื‘ืจื™ืช

  • “ืกื›ื ืืช ื”ืžืฉืœื•ื—ื™ื ืฉืœื ื•”
  • “ื›ืžื” ืžืฉืœื•ื—ื™ื ื‘ื•ืฆืขื• ื•ืžื” ืฉื•ื•ื™ื™ื ื”ื›ื•ืœืœ?”
  • “ืžื” ื”ืขืจืš ื”ื›ื•ืœืœ ืฉืœ ื”ืžืฉืœื•ื—ื™ื ื”ืคืชื•ื—ื™ื?”

Arguments

ArgRequiredMeaning
card_codeoptionalOne customer, e.g. C001. Omit for all.
from_dateoptionalDelivery date on/after, YYYY-MM-DD.
to_dateoptionalDelivery date on/before, YYYY-MM-DD.
document_statusoptionalopen or closed.

Example result

12 deliveries, total $84,300. Smallest $180, largest $12,600 โ€” dated 2026-01-04 through 2026-06-28.

Result columns

ColumnTypeMeaning
countnumberHow many delivery notes matched the filters.
total_valuenumberTheir combined value.
min_valuenumberThe smallest delivery in the set (0 when nothing matched).
max_valuenumberThe largest delivery in the set (0 when nothing matched).
date_fromdateThe earliest delivery date in the set (empty when nothing matched).
date_todateThe latest delivery date in the set (empty when nothing matched).

No charts: the report is a single aggregate row, so there is no series or category to plot along. Use list_deliveries when you want something chartable.

  • list_deliveries โ€” the line-by-line delivery notes rather than the aggregate.
  • run_named_query โ€” mcp-ar-summary is the equivalent summary for customer invoices.