select sum(money) as s1 from w_user_money where uid=10086 and money_plusminus=1;select sum(money) as s2 from w_user_money where uid=10086 and money_plusminus=2;求 s1-s2 mysql 怎么写
2 回答
米脂
TA贡献1836条经验 获得超3个赞
1 2 3 4 5 | select ( (select sum(money) as s1 from w_user_money where uid=10086 and money_plusminus=1) - (select sum(money) as s2 from w_user_money where uid=10086 and money_plusminus=2) ) |
添加回答
举报
0/150
提交
取消