Interview practice question
Ragged chart of accounts hierarchy
Data Engineering · Data Modeling · Experienced
Finance has a chart of accounts with variable depth, where some branches have 3 levels and others 8. Reports need rollups at any level. How do you model it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Store parent-child relationships for accounts.
- Build a closure or hierarchy bridge table with ancestors and depth.
- Or flatten to a fixed number of levels by repeating the lowest level.
- Handle hierarchy versions over time.
- Test that rollups equal leaf totals.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.