22,207
社区成员
发帖
与我相关
我的任务
分享
select id, date,max(MaxNum) MaxNum from(select CONVERT(varchar(13), date,120) date,id, case when a<b then( case when b<c then c else b end) else(case when a<c then c else a end) end as MaxNum from tb where ) as t3 group by id,date
select id, date,max(MaxNum) MaxNum from(select CONVERT(varchar(13), date,120) date,id,
case when a<b then( case when b<c then c else b end) else(case when a<c then c else a end)
end as MaxNum from tb )
as t3 group by id,date