代码 select hour(click_time) as click_hour ,count(hour(click_time)) as click_cnt from user_ad_click_time group by click_hour order by click_cnt desc limit 1 知识点 order by和limit的连用,取出所需结果 YEAR() 返回统计的年份 MONTH() 返回统计的月份 DAY() 返回统计的天 HOUR() 返回小时值 MINUTE() 返回分钟值 SECOND() 返回秒数 WEEK() 全年第几周