I'd like to have a SELECT query to get the average time of a person's day
(not necessarily a strict 24 hour day) given timestamps of the form:
'YYYY-MM-DD HH:MM:SS.mmmmmm'.  The data will have gaps of days in which
there is no timestamp for that day.

The problem is, simply averaging times of day gets into a problem if times
cross midnight and days are non-consecutive.  For example, the average I'd
want from these three timestamps:

'2012-02-18 22:00:00.000000'
'2012-02-19 23:00:00.000000'
'2012-02-28 01:00:00.000000'

Should be 11:20pm, as they are all within a few hours of each other at
night.  I have not been able to find a query that produces this.

Thanks,
Che
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to