Identify and mark duplicates where any of them has a specific quality
I have a data set where I need to group the duplicate records and then see if any of the group has been flagged; if so, I need to indicate that it has been flagged in a new column.