I have a table with records similar to the following
Once an order_id is inserted i.e. order_id = 34. A new record is not inserted(not an append) when the order_balance changes, the balance itself is updated in the same record. So say the balance for order_id=34 changes tomorrow to 300. When you look at the table tomorrow(lets say tomorrows date is 2020-02-01).
the recrd for order_id = 34 will look like:
So I want to build a table that keeps track of the order_ids and the order_balances that are either newly inserted, or have had the balance change in the last day(or time period, could be hours,days,minutes,etc).