For the planes which has the hightest total price, how much it exceeds the average?
plane is a product line; total price = MULTIPLY(quantityOrdered, priceEach); how much the total price exceeds the average = SUBTRACT(MAX(MULTIPLY(quantityOrdered, priceEach))), AVG(priceEach));
SELECT MAX(quantityOrdered * priceEach) - AVG(priceEach) FROM orderdetails WHERE productCode IN ( SELECT productCode FROM products WHERE productLine = 'Planes' )