# Purchase payloads contain an items array, each item an object with sku and qty

Canonical URL: <https://datadriven.io/problems/purchase-payloads-contain-an-items-array-each-item-an-objec-c2c32890>

Domain: SQL · Difficulty: medium

## Problem

Purchase payloads contain an items array, each item an object with sku and qty. Return event_id, the number of items in the order, and the sku of the FIRST item, for each purchase event, ordered by event_id. Columns: event_id, n_items, first_sku.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/purchase-payloads-contain-an-items-array-each-item-an-objec-c2c32890)
- [SQL Interview Questions](https://datadriven.io/sql-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.