I've table like this:
Id Type Amt
-----------------
101 Cash 100
101 Credit -100
102 Cash 200
101 Debit 100
102 Credit -50
102 Debit 100
101 Expense 200
------------------
I want the query to retrive records where for the same ID=101, if the Sum of the Amt=0
where Type in ('Debit', 'Credit'), IGNORE those 2 rows else retrive all rest of the rows.
Please Help