这个题怎么做呀,求大佬解答
全部评论
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
相关推荐
10-24 11:10
山西大学 Java 点赞 评论 收藏
分享