绝对可以实现,需要自己努力尝试,可以尝试将‘大海燎原’的 select opebill_id, sum(decode(opetype, '倒灌来自', val, '倒灌去玩', -val, 0)) as val from tb_name group by opebill_id 中SUM 改变成为MAX尝试。
第2个回答 2014-04-02
select opebill_id, sum(decode(opetype, '倒灌来自', val, '倒灌去玩', -val, 0)) as val from tb_name group by opebill_id本回答被提问者采纳