Daily average server

What is the best way to get the daily average. Data will have 2 values ​​per day, for example:

Date Value 1/1/2012 4:00 10.00 1/1/2012 16:00 11.00 1/2/2012 4:00 11.22 1/2/2012 16:00 13.55 etc. 
+4
source share
3 answers
 Select CAST(DateColumn as date), AVG(Value) From Table Group By CAST(DateColumn as date) 
+7
source
 select date, avg(value) from yourTable group by date 
+1
source
 select cast(Date as date), avg(Value) from Table group by cast(Date as date) 
+1
source

Source: https://habr.com/ru/post/1401590/


All Articles