programming-examples/sql/AggregateFunctions/Write a SQL query to display the average price of each company's products, along with their code.sql

5 lines
217 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a SQL query to display the average price of each company's products, along with their code.*/
SELECT AVG(pro_price) AS "Average Price",
pro_com AS "Company ID"
FROM item_mast
OUP BY pro_com;