题解 | #牛客直播各科目平均观看时长#

牛客直播各科目平均观看时长

http://www.nowcoder.com/practice/e9e7dc4c8623467793f6999cbfee9360

unix_timestamp相减的结果为秒数,除以60为分钟 select t2.course_name,round(t1.num,2) avg_num from (select course_id,avg((unix_timestamp(out_datetime)-unix_timestamp(in_datetime))/60) num from attend_tb group by course_id )t1 left join (select * from course_tb)t2 on t1.course_id=t2.course_id order by avg_num desc

全部评论

相关推荐

给🐭🐭个面试机会...:我擦seed✌🏻
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务