同一张卡下会有多条记录, 只要状态里出现“已扣金”记录 ,就将它排除。
表: A
卡号: CARD_CODE
状态: ACTION
select CARD_CODE from A WHERE CARD_CODE NOT IN (select CARD_CODE from A WHERE ACTION='已扣金')
select * from A where ACTION not in '已扣金'