← Questions

Unique visitors per department from click logs

0
AmazonCodingLast asked Sep 2025

Each product has an id, a department, a category and a subcategory; the last three form a parent-child hierarchy. A click log records (customer_id, product_id). For any department, return the number of distinct customers who clicked a product in it. Discuss answering this for many departments, and at other levels of the hierarchy.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding