Skip to content

2985. Calculate Compressed Mean

1
2
3
4
5
6
SELECT
  ROUND(
    SUM(item_count * order_occurrences) / SUM(order_occurrences),
    2
  ) AS average_items_per_order
FROM Orders;