MySQL: Calculate Average
Question by Guest | 2016-07-07 at 13:34
I would like to determine the mean value of all values stored in my MySQL database table "products".
I have already played around a bit with functions like SUM() and COUNT(), but I do not really come to a result. Can someone help me?
Related Topics
MySQL: Read out Prices over or under the average Price
Question | 1 Answer
MySQL: Change minimum word length for full text search
Tip | 1 Comment
MySQL: Regular Expressions in MySQL queries
Info | 0 Comments
MySQL: CSV Export as File stored on the Server
Tutorial | 0 Comments
MySQL: CSV Export as automatic Download
Tutorial | 0 Comments
How quick is hair growing?
Info | 0 Comments
Calculate Hash using PHP
Info | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can just use the built in function AVG(). This function is automatically calculating the average value of a column.
You can use it for example like that:
Here, we are calculating the average price taken from the column "price" in the table "products".
2016-07-07 at 20:00