w3resource
SQL exercises

SQL: Calculate the average price of all products of the manufacturer which code is 16

SQL Basic Select Statement : Exercise-26 with Solution.

Write a SQL query to calculate the average price of all products of the manufacturer which code is 16.

Sample table : item_mast

 

Sample Solution :

SELECT AVG(pro_price) FROM item_mast 
  WHERE pro_com=16;

Output:

SQL exercises

Query Visualization:

Duration:

Query visualization of Calculate the average price of all products of the manufacturer which code is 16 - Duration

Rows:

Query visualization of Calculate the average price of all products of the manufacturer which code is 16 - Rows

Cost:

Query visualization of Calculate the average price of all products of the manufacturer which code is 16 - Cost

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a SQL query to find all the products with a price between Rs.200 and Rs.600.
Next: Write a SQL query to find the item name and price in Rs.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming