SELECT AVG(buyprice) 'Avarage Price' FROM products;
SELECT AVG(buyprice) 'Avarage Classic Cars Price' FROM products WHERE productline = 'Classic Cars';
SELECT COUNT(buyprice) - COUNT(DISTINCT buyprice) FROM products;
SELECT AVG(DISTINCT buyprice) FROM products;
SELECT productline, AVG(buyprice) 'Avarage Price' FROM products GROUP BY productline;
SELECT productline, AVG(buyprice) 'Avarage Price' FROM products GROUP BY productline HAVING AVG(buyprice) > 50;
SELECT AVG(pl_avg) 'Average Product' FROM ( SELECT AVG(buyprice) pl_avg FROM products GROUP BY productline ) avgs;
SELECT AVG(IF(productline='Classic Cars',buyprice,NULL)) / AVG(buyprice) 'Classic Cars/ Products' FROM products;