I need to use the dateadd function to add a number of days found in one column to a certain timestamp found in another column.
select number_id,
DATEADD('days',NUM_DAY, MY_DATETIME) as LAST_DATETIME
FROM TBL1
GROUP BY 1
However, for each number_id, I might have more than one "num_day". For each number_id, I only want have one record, and the NUM_DAY should select the LAST num_day that was inserted based on last added_timestap.
Is there a way to do this?