日期:2014-05-18 浏览次数:20647 次
select sum(出货数量) from a where 售货员 = 'a' and 出售物品 = 'b' and 时间 between 2011-11-01' and '2011-11-30'
------解决方案--------------------
select sum(出货数量) from a where 售货员 = 'a' and 出售物品 = 'b' and 时间 between '2011-11-01' and '2011-11-30' select sum(出货数量) from a where 售货员 = 'a' and 出售物品 = 'b' and convert(varchar(7),时间,120) = '2011-11'