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_id | purchases |
|---|---|
| 1 | 2 |
| 3 | 1 |
| 5 | 1 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in