dulei115() 对的 .
或者 加 group by
select * from 表 where convert(char(7),时间字段,120) in (
select top 2 convert(char(7),时间字段,120) as 月份 from 表
group by convert(char(7),时间字段,120)
order by convert(char(7),时间字段,120) desc
)
改一下 didoleo(冷月无声) 的
select * from 表
where convert(char(7),时间字段,120) in (
select distinct top 2 convert(char(7),时间字段,120) as 月份 from 表 order by convert(char(7),时间字段,120) desc)