#23

Average items per order from compressed data

Alibaba stores its order distribution in a compressed table: for each number of items in an order, the table shows how many orders had that item count. Calculate the average number of items per order, round the result to one decimal place, and return it in the mean column.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

mean
2.7
Alibaba

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid