You can pull the average of the numeric values in a column with SQL in MySQL.
avg()
- https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html
- https://www.w3schools.com/sql/func_mysql_avg.asp
Select avg(temp) from temp;
Select avg(temp) from temp where macAddress=‘60bbbaa4ae30’
Select avg(temp) from temp where macAddress=‘60bbbaa4ae30’ and timestamp > 1158013757
Select macAddress, avg(temp) from temp group by macAddress
Be the first to comment