SQL scripts for purging database history


I am looking for SQL scripts for purging the entries from the Camunda History tables in my database. I don’t want to use the Camunda provided Rest API for deleting the entries My requirement is a bit more complex - I want to get a list of business keys for processes that have have been completed before a predefined period from the current date - say 10 days. Then purge those entries using SQL script. Does camunda provide such scripts?

@Shyam Camunda doesn’t provide custom sql scripts to purge the history data.

Maybe you can write those scripts by yourself which won’t be difficult one, because camunda history tables doesn’t have foreign key associations, so you can delete the data in the table(s) in any order as per your need.