合计汇总金额SQl


select (sum(case when a.wtfx='买入' then a.cjje end) -sum(case when a.wtfx='卖出'then a.cjje end)) as hj from amountsum a where a.jjname like '%沪港深%'

猜你喜欢

转载自blog.csdn.net/LeonAurora/article/details/78053927
今日推荐