我有这个 MySQL 查询,它告诉我状态更改条目之间的区别:
SELECT
t1.`TRACKID` AS TicketNumber,
TIMEDIFF(t2.`date`, t1.`date`) AS Difference
FROM
hesk_history t1
JOIN hesk_history t2 ON t2.`TRACKID` = t1.`TRACKID` AND t1.`Action` = 'Created' AND (t2.`Action` = 2)
给我以下结果集:
TicketNumber Difference
2013-08-12-36 410:21:25
2013-06-12-91 00:01:22
2013-08-12-50 00:00:26
然后我如何对这个结果集进行 AVG 处理?