group 中的矛盾??? select zhang,mu,金额=sum(case when de=0 then tbdj*tb1 else gcl*de end) from table group by zhang,mu 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select zhang ,mu 金额=sum(case when sum(de)=0 then sum(tbdj*tbl) else sum(gcl*de) end ) from table group by zhang ,mu select zhang,mu,金额=sum(case when de=0 then tbdj*tb1 else gcl*de end) from [table] group by zhang,mu Select zhang,mu,金额=SUM(Case de When 0 Then tbdj*tb Else tb*gcl End)from tableGroup By zhang,mu Select zhang, mu 金额 = sum(case when de = 0 then tbdj * tbl else gcl * tb and) fromtable group by zhang, mu Select zhang, mu 金额 = sum(case when de = 0 then tbdj * tb else gcl * tb and) fromtable group by zhang, mu上面的错了。 sql语句插入问题 如何获取view结构? 再提行转列问题 如何使用sql查询获得某月累计天数的产品量? 如何取得空缺的id 关于一个powerdesigner的问题(字段属性),很急,在线等,一定给分 多个客户端同时读取一个表内的数据,怎样做到不重复取出数据 请问高手怎样按月份查询 求sql语句。关于时间问题 我为什么这么不走运? 无法订阅发布的问题 sql server ce支持存储过程吗?
Select
zhang,
mu,
金额=SUM(Case de When 0 Then tbdj*tb Else tb*gcl End)
from table
Group By zhang,mu
table group by zhang, mu
table group by zhang, mu上面的错了。