第2个回答 2009-12-29
select top 10 a表.id ,tt.* from a表,(select title as vv,count(*) as sort from a表 group by title order by sort desc) as tt where month(sdate)='月份' and a表.title=tt.vv order by sort desc
或是
select top 10 id,count(title) as x,price,sdate from a表 month(sdate)='月份' group by id,price,sdate order by count(title) desc
看看哪个适合你