#1140

Purchases per user

Product analytics over the a_events table (event type in kind: visit, cart, purchase). Count the purchases per user. Return user_id and purchases, ordered by user_id. Exclude users with no purchases.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

user_idpurchases
12
31
51

Your query result will appear here