I have a table in Postgresql which stores product information and it's price. The problem is, as price of the product changes, the prices are updated in existing rows, so I do not have the historical data. I would like to take a snapshot of this table every night at 12:00 and store this data in another table so that I can find out change in price everyday.
The postgresql database is hosted in AWS. I have to write a node.js script which does this task. You can assume the Table structure to be like:
2.1m questions
2.1m answers
60 comments
57.0k users