Data Engineering/data preprocessing
SELECT * FROM
( SELECT * , ROW_NUMBER() OVER (PARTITION BY ID ORDER BY REGDATE DESC) AS RN FROM A ) a
WHERE a.RN = 1