I have a table that has an account number field and an amount field. In some cases the account number is duplicated and the amount field is different. In other cases the account number is duplicated but the amount field is the same. For the duplicates that have different amount values, I need to delete the record with a value that is greater than zero. For the duplicates that have the same amount values, I just need to delete one of the duplicate records.
Can anyone help me create a query that deletes duplicates based on criteria?