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

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

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

select
course_name
,round(sum(timestampdiff(minute,in_datetime,out_datetime))/count(user_id),2) as avg_Len
from attend_tb
join course_tb
using (course_id)
group by course_name
order by avg_Len desc;

在时间上的相减,timestampdiff(minute, in_datetime,out_datetime )

全部评论

相关推荐

给个offer灞:校友 是不是金die
点赞 评论 收藏
分享
挥毫自在:想白嫖你呢
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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