clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2249057 fiddles created (32147 in the last week).

CREATE TABLE table_name (Region, Location, Amount, "DATE", Name ) AS SELECT 1, 'Location1', 500, DATE '2021-01-01', 'UserA' FROM DUAL UNION ALL SELECT 1, 'Location1', -500, DATE '2021-01-02', 'UserA' FROM DUAL UNION ALL SELECT 2, 'Location2', 700, DATE '2021-01-03', 'UserB' FROM DUAL
3 rows affected
 hidden batch(es)


DELETE FROM table_name t WHERE EXISTS ( SELECT 1 FROM table_name x WHERE x.region = t.region AND x.location = t.location AND x.amount = -t.amount AND x."DATE" IN (t."DATE" - 1, t."DATE" + 1) AND x.name = t.name )
2 rows affected
 hidden batch(es)


SELECT * FROM table_name;
REGION LOCATION AMOUNT DATE NAME
2 Location2 700 03-JAN-21 UserB
 hidden batch(es)