title: How to purge old records from a table automatically using shell script
body: <p>I have a main table which is having sub partition month wise based on date condition.I have a request for purging out the old records from this main table keeping only the last 24 months of records along with max value and default sub partition.
  How to write a shell script with a SQL query for this ?</p>