How do you calculate the average price, and why does AVG(price) give the wrong result here?
Each order line item records the price per unit (price) and the number of units (quantity). How would you calculate the average price per unit sold? Give an example showing why AVG(price) can produce the wrong result.
ExplainGROUP BY / HAVINGMiddleAnalystData Engineer