日期:2014-05-18 浏览次数:20555 次
--这样吗? select --sm_date, sum(case when sm_state=1 then sm_pricecount else 0 end) as sm_pricecount1, sum(case when sm_state=0 then sm_pricecount else 0 end) as sm_pricecount0 from sell_manage where sm_date='xxxxxx'