customers_by_order_count
Identify top customers by total orders placed, with optional date range filtering. Counts all orders including cancelled, returns customer ID, name, and order count, defaulting to 10 results.
Instructions
Top customers by number of orders placed. NOTE: unlike the other analytic tools, this counts ALL orders (cancelled orders are NOT excluded). Optionally filter by date range on order_date. Each row: { customer_id, name, orders }. Default limit 10.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only include orders with order_date <= this ISO date/datetime. | |
| from | No | Only include orders with order_date >= this ISO date/datetime. | |
| limit | No | Max customers to return. |