How to perform AVG, arithmetic operations in MySQL query I am trying to perform some arithmetic operations and avg in single query, e.g I had two column data in a table which looks like this

Temp            value         value2   

1401631200      -85.5582      6.87686 
1401631201      -85.266       6.54354
1401631202      -83.266       6.9174344  
1401631203      -84.1243      6.900333 
.
. 
.
.
.
1401632400      -83.43532     6.3335622


So I perform AVG by using this query statement and it works perfectly fine and produces the average value. and SQL statement is 

SELECT avg(value) as value_avg1 FROM kami_all_dat WHERE usec &gt;= 1401631200 AND
usec &lt;= 1401632400


and for average of value2 I can use this statement

SELECT avg(value2) as value_avg2 FROM kami_all_dat WHERE usec &gt;= 1401631200 AND 
usec &lt;= 1401632400


I am trying to perform some arithmetic operations after getting this average value on the fly in query. my formula looks like:

final_val = value_avg1 + (5.67 * 10^(-8) * (value2_avg + 273.14)^4)


I am trying to achieve like this, for example 

SELECT (avg(value) as Average FROM kami_all_dat WHERE usec &gt;= 1401631200
AND usec &lt;= 1401632400) + {arithmetic operation} * SELECT (avg(value2) as 
value_avg1 FROM kami_all_dat WHERE usec &gt;= 1401631200 AND usec &lt;= 1401632400) +
{arithmetic operations} 


I am trying to achieve the single value as final_val and I am trying to perform all these operation in a single query. 
But I am facing difficulty to do these arithmetic operations as mention in final_val in a single query as well as doing this average values calculation in single query. 

I am beginner to database technology. Any help or guidance will be greatly appreciated. Thanks
You can simply use the arithmetic operators in the first SELECT 



SELECT 
   AVG(value) as value_avg1,
   AVG(value2) as value_avg2,
   AVG(value) + (5.67E-8 * POWER(AVG(value2) + 273.14, 4)) as final_value
FROM kami_all_dat
WHERE usec &gt;= 1401631200 AND usec &lt;= 1401632400