--问题求 集合中每天最大时间的总和 表中的数据 列: 用户 分数 时间 A 2 2014-01-01 01:00:00 A 2 2014-01-01 02:00:00 A 2 2014-01-01 03:00:00 A 2 2014-01-02 01:00:00 A 2 2014-01-02 02:00:00 A 2 2014-01-02 03:00:00 A 2 2014-01-03 02:00:00 A 2 2014-01-03 03:00:00 A 2 2014-01-04 01:00:…
24小时内记录(即86400秒) $sql="SELECT video_id,count(id)as n FROM `rec_down` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(add_time)<=86400 group by video_id order by n desc ";$sql="select a.id,a.title,b.n from video_info a,(".$sql.")b wh…