programming-examples/sql/Joins/2Write a SQL query to display the average price of items of each company, showing the name of the company.sql
2019-11-18 14:05:53 +01:00

6 lines
318 B
SQL

/*2Write a SQL query to display the average price of items of each company, showing the name of the company.*/
SELECT AVG(pro_price), company_mast.com_name
FROM item_mast INNER JOIN company_mast
ON item_mast.pro_com= company_mast.com_id
GROUP BY company_mast.com_name
HAVING AVG(pro_price) >= 350;