MySQL Average
MySQL; it's like a calculator inside your computer. Today I learned how to compute the average of something using this popular RDBMS.
Let's compute the average length of name
in table dog
.
mysql> select avg(char_length(name)) from dog;
Result:
+------------------------+
| avg(char_length(name)) |
+------------------------+
| 9.2965 |
+------------------------+
Tweet