medium10 pts · first answer countsproduct-analyticssqlcohorts
First purchase per user
What does this query return?
SELECT user_id, order_id, created_at
FROM (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY user_id ORDER BY created_at) AS rn
FROM orders
) t
WHERE rn = 1;Discussion 0
Join free to post in the discussion.
Related questions
- Events and propertiesProduct Manager
- User property or event propertyProduct Manager
- Why write a tracking planProduct Manager
- Users or eventsProduct Manager
- Conversion window in a funnelProduct Manager
- What a cohort isProduct Manager
- Behavioural cohortProduct Manager
- What Day 7 retention measuresProduct Manager