SQL Subquery Exercises: Find the average price of each manufacturer's products along with their name
SQL SUBQUERY: Exercise-31 with Solution
31. Write a SQL query to find the average price of each manufacturer's products along with their name.
Sample table: company_mast
Sample table: item_mast
SELECT AVG(pro_price) AS "Average Price", company_mast.com_name As "Company" FROM item_mast, company_mast WHERE item_mast.pro_com= company_mast.com_id GROUP BY company_mast.com_name;
Contribute your code and comments through Disqus.
Previous: Write a query to find all those customers who hold a different grade than any customer of the city Dallas.
Next: Write a SQL query to display the average price of the products which is more than or equal to 350 along with theri names.
What is the difficulty level of this exercise?