Hacker News new | past | comments | ask | show | jobs | submit login

I don’t know specific of accounting but in general you want to save a log of immutable events that you then translate into read model. In practice you have transaction record with some productId and maybe price at that point in time, you can simply reduce all that transactions into (materialized) view with some group by. To have performant complex queries learn about WITH.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: