https://blog.csdn.net/guliguliguliguli/article/details/126109166
SELECT DATE(in_time) dt,
ROUND(SUM(TIMESTAMPDIFF(SECOND,in_time,out_time))/COUNT(DISTINCT uid),1) avg_viiew_len_sec
FROM
tb_user_log
WHERE
YEAR(in_time)=2021 AND MONTH(in_time)=11
GROUP BY
DATE(in_time)
ORDER BY
avg_viiew_len_sec ASC;