title: In oracle SQL DB same primary Id is present more then once with different batch_id. How can I know the batch ID just before the current batch ID
body: <p>I am working on oracle database.
  We load customer data in source table which eventually migrates to target table.
  Every time customer data is loaded in source table it is having a unique batch_id.
  If we want to update some field in customer table, then we again load the same customer in source table but this time with different batch_id.
  Now I want to know batch_id of the customer just before the latest batch_id. 
  Batch_id we take is usually the current date.</p>