Is there a way to loop thru looking for duplicated values in a table "column1" and look at the next row in column2 for a value and if the value equals BBB then delete the duplicate values.

column1 column2

AAA
AAA
-------------BBB

CCC
CCC
CCC
-------------BBB