Shopee interview question

Aggregate data based on a category