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: Line Breaks in MySQL
Tip | 0 Comments
Local Gravity for different Places and Planets
Info | 0 Comments
Calculation of the Local Gravity
Info | 0 Comments
Calculation of the Free Fall
Info | 0 Comments
MySQL: Change minimum word length for full text search
Tip | 1 Comment
MySQL: Read out Prices over or under the average Price
Question | 1 Answer
MySQL: Regular Expressions in MySQL queries
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