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 usesGROUP 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.
Steps
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.- SQL
- YAML
Example - sliced by country
| Country | AOV |
|---|---|
| India | $43.00 |
| Germany | $42.02 |
| Sweden | $41.99 |
| England | $41.97 |
| Australia | $41.49 |
| Global | $40.74 |
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.Related reading
- Fixed grouping -
reference on
GROUP BY (entity.key)