InterviewDB Experience

Data Pivot Table: Transform Row-Level Records into a Cross-Tabulated Summary Table

Interview Experience

Problem Given a list of records with dimensions and a metric, produce a pivot table. Rows are indexed by one dimension, columns by another, and cells contain an aggregated metric (sum or average). Follow-ups How do you handle missing combinations (e.g., South has no product B)? Return 0, null, or omit the key? Add a totals=True option that appends row totals and a grand total column. Walk through the implementation. Support a third dimension as a page filter (e.g., filter to only year=2024 befor…

Full Details

🔒

Unlock all Instacart questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a candidate experience report from a instacart interview during the onsite round.

It covers the following topics: Coding, Sql, Onsite .