- or download this
SELECT <total_time_in_system> / <number_of_times_in_system>
FROM . . .
- or download this
mysql> describe timestamps;
SESSION INT
...
ENTRY TINYINT
. . .
mysql>
- or download this
SELECT SUM(UNIX_TIMESTAMP(b.time) - UNIX_TIMESTAMP(a.time))
FROM timestamps a, timestamps b
...
FROM timestamps
WHERE entry = 1
;