Compute Rollup Fields Across Linked Project and Task Records
Last updated: November 29, 2026
Quick Overview
Projects link to many tasks through a linked-record field. Given the links and the task records, compute a rollup (SUM, COUNT, MAX or AVG) of a numeric task field for every project, skipping blank values and links to deleted tasks.
Airtable
November 29, 20260
0
0 solved
Projects link to many tasks through a linked-record field. Given the links and the task records, compute a rollup (SUM, COUNT, MAX or AVG) of a numeric task field for every project, skipping blank values and links to deleted tasks.
Rollups over linked records are one of the features that make Airtable a relational database rather than a spreadsheet. The interviewer wants clean code, sensible defaults for empty aggregates, and awareness of dangling links.
What the Interviewer Expects
- Ask what an empty rollup should return for each aggregate
- Skip dangling links and non-numeric values
- Keep the aggregation logic in one place
- Give linear complexity in total links
- Mention how recomputation is triggered on edits
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you update a single project's rollup when one task's Hours changes, without recomputing everything?
- How would you support a rollup of a rollup across three tables?
- What changes if the aggregate is a distinct count of a text field?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
projects maps project id to a list of linked task ids; tasks maps task id to its fields. Output one value per project. SUM and COUNT of nothing are 0; MAX and AVG of nothing are blank (None), be...
High-Level Design
For each project, gather the numeric values of its linked tasks with a dictionary lookup, then apply the aggregate. Unknown aggregate names raise so a misconfigured field fails loudly instead of silen...