How do you explode or unnest an array (or JSON array) into rows for analysis, and when is this technique needed?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how to turn an array or JSON array column into one row per element in SQL, and when an analysis needs that step. Tests knowledge of lateral joins and unnest syntax across engines, handling of empty arrays and element order, and the aggregation errors that row multiplication can cause.