select 日期=convert(varchar(10),reciveTime,120), CH=(selecttop1 CH from tb whereconvert(varchar(10),reciveTime,120)=convert(varchar(10),a.reciveTime,120) orderby reciveTime desc), 个数=count(*)from tb a groupbyconvert(varchar(10),reciveTime,120)
本文共 289 字,大约阅读时间需要 1 分钟。
select 日期=convert(varchar(10),reciveTime,120), CH=(selecttop1 CH from tb whereconvert(varchar(10),reciveTime,120)=convert(varchar(10),a.reciveTime,120) orderby reciveTime desc), 个数=count(*)from tb a groupbyconvert(varchar(10),reciveTime,120)
转载于:https://www.cnblogs.com/jylf/p/3213951.html