------解决方案--------------------
select 书号,销售量=sum(销售量) ,销售总额=sum(销售量*价格) from 销售表 where datediff(month,销售日期,日期参数)=0 group by 书号 order by 销售量 desc
------解决方案--------------------
------解决方案--------------------
C# code
SqlCommand cmd = new SqlCommand("select bno,sum(bbnum)from BuyorBack where datediff(month,bbdate, dt.ToString())=0 group by bno order by sum(bbnum) desc", con);