I have a table called batch_history with below data. The table consists of data for different batches (batch ids will vary). I would like to update the current_status_start_date to the rec_change_date of the previous row. I want this to get updated only for records with current_status_id as 3310 and 3320. This should be done for all the batches (In screenshot I have just shown the data of one batch) available in batch_history table with data_stream_id as 129.
Current Data in batch_history table:
Needed output in batch_history table:
I have gone through queries using 'WITH' clause but still I am unable to figure out the exact usage and solution for this issue. Please help out. Thanks in advance.