Skip to main content

Documentation Index

Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

When would you use this?

  • A menu designer asks “Which trucks have customers spending the most per visit?” - requires averaging total order spend, not individual line-item prices.
  • Finance wants to track average order value over time to measure whether upselling campaigns are working, sliced by city and truck.
  • Operations needs to identify premium trucks - those where more than half of orders exceed $50 - to decide which locations to prioritize for higher-end menu items.
  • You need an AOV metric that works correctly whether a BI user groups by truck, city, day, or customer age group - without duplicating logic for each view.

What this recipe builds

Two metrics demonstrating the fixed-grouping pattern. The inner metric uses GROUP BY (order_header.order_id) to always compute at order grain - the grain never changes regardless of user context. The outer metric averages that fixed-grain value, inheriting whatever dimension the user has chosen. The result: AOV is always computed correctly at order grain, regardless of how the data is sliced.
This recipe uses the fixed grouping concept. See the documentation for the full technical reference.

Steps

1

Revenue per order (inner)

Total revenue per order - always at order grain regardless of user context. The fixed GROUP BY never changes.Since it is defined as a metric, it responds to user-applied filters. For example, filtering to a single city computes revenue per order for that city only.
SUM(order_detail.price) GROUP BY (order_header.order_id)
2

Average Order Value

Mean spend per order visit. Grouped by truck = AOV per truck. Grouped by city = AOV per city. Always correct because the inner grain is fixed.
AVG(order_detail.order_total_revenue)

Example - sliced by country

CountryAOV
India$43.00
Germany$42.02
Sweden$41.99
England$41.97
Australia$41.49
Global$40.74
Each row shows the average order value for that country. The inner metric computes revenue per order, and the outer AVG collapses to the country level. The global AOV ($40.74) is the average order value across all orders.

Next step

To compute what fraction of orders exceed a threshold using the fixed-grain metric, see High value order share.