在此感谢普龙师兄的大力支持,谢谢你了普龙.
select * from chen where id in(select MAX(ID) from chen group by b) and c>CONVERT(VARCHAR(11),(select top 1 DATEADD(day,DATEDIFF(day,7,c),0) from chen order by c desc,id desc),120) order by c desc,id desc
和
select * from chen where id in(select MAX(ID) from chen where c>CONVERT(VARCHAR(11),(select top 1 DATEADD(day,DATEDIFF(day,7,c),0) from chen order by c desc,id desc),120) group by b) and c>CONVERT(VARCHAR(11),(select top 1 DATEADD(day,DATEDIFF(day,7,c),0) from chen order by c desc,id desc),120) order by c desc,id desc