I need a query for SCD2 in MySQL using:
DATA STRUCTURE: id, data, start_date, end_date
id, data, start_date, end_date
if the record_id exist:
-update the record\'s end_da