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
Coding & Algorithms
Software Engineer
Airtable
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Easy

0

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
Linked records
Aggregation
Hash maps
Null semantics
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. 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 Problems
Sample 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...


Submit Your Answer
Markdown supported

Related Questions