Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| -- ----------------------- Ledger Balance for both ignored and unignored--------------- | |
| delete from ledger_balance_event where id in | |
| ( | |
| select distinct lbe.id | |
| from ledger_balance_event lbe | |
| inner join ledger_balance lb on lbe.id = lb.id and lb.status <> 'REFERENCE' | |
| where lb.ledger_id in (<ignored_accounts,unignored_accounts>) | |
| ); | |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/