这个题怎么做呀,求大佬解答
全部评论
select
brand
,least(a.time_all,a.time_one)
from
(select
brand
,min(start_time) as start_min
,max(end_time) as end_min
,max(end_time)-min(start_time)+1 as time_one
,sum(end_time-start_time+1) as time_all
from t
group by
brand
) a
相关推荐
11-27 23:26
湖北商贸学院 游戏前端 点赞 评论 收藏
分享