I need to find out the average time in which an event starts. The start time is recorded in DB in startDate column.
| StartDate |
|=====================|
|2015/04/10 3:46:07 AM|
|2015/04/09 3:47:37 AM|
|2015/04/08 3:48:07 AM
|2015/04/07 3:43:44 AM|
|2015/04/06 3:39:08 AM|
|2015/04/03 3:47:50 AM|
So what I need is calculate the average time (hh:MM:ss) the event starts daily.
I am not quite sure how to approach this. Below query won't work coz it just sums up and divide the total value by total number:
SELECT AVG(DATE_FORMAT(StartDate,'%r')) FROM MyTable