SQL Exercises: Calculate the average price of all the products
SQL Aggregate Functions: Exercise-21 with Solution
Write a SQL query to calculate the average price of all the products.
Sample table: item_mast
SELECT AVG(pro_price) AS "Average Price" FROM item_mast;
Output of the Query:
Average Price 1435.0000000000000000
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a query that counts the number of salesmen with their order date and ID registering orders for each day.
Next: Write a SQL query to find the number of products with a price more than or equal to Rs.350.
What is the difficulty level of this exercise?
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework