At gøre dette med en join vil være hurtigere:
SELECT a.*
FROM mytable a
LEFT JOIN mytable b
ON a.account_number_cus = b.account_number_cus
AND b.original_date_ctr < a.original_date_ctr
WHERE b.id_ctr IS NULL
At gøre dette med en join vil være hurtigere:
SELECT a.*
FROM mytable a
LEFT JOIN mytable b
ON a.account_number_cus = b.account_number_cus
AND b.original_date_ctr < a.original_date_ctr
WHERE b.id_ctr IS NULL