संयोजन मानते हुए (person_id, car_id)
तालिका में अद्वितीय है, आप कुछ इस तरह कर सकते हैं:
delete from car_assignment
where (person_id, car_id)
in (select person_id, car_id
from (
select person_id,
car_id,
row_number() over (partition by person_id order by car_id) as rn
from car_assignment
) t
where rn > 2);