Challenge: Window Function Metrics
Taak
Swipe to start coding
You will analyze product metrics for A/B test groups using window functions.
- Find all users who have made at least one purchase.
- For each such user, calculate the total number of purchases they have made.
- Within each ab_group ('A' or 'B'), assign a rank to each user based on their purchase count, with the highest purchase counts ranked first.
- Use the DENSE_RANK() window function so that users with the same purchase count receive the same rank, and no ranks are skipped.
- Return these columns: user_id, ab_group, purchase_count, group_purchase_rank.
- Order the results by ab_group and group_purchase_rank.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 4
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Geweldig!
Completion tarief verbeterd naar 4.17
Challenge: Window Function Metrics
Veeg om het menu te tonen
Taak
Swipe to start coding
You will analyze product metrics for A/B test groups using window functions.
- Find all users who have made at least one purchase.
- For each such user, calculate the total number of purchases they have made.
- Within each ab_group ('A' or 'B'), assign a rank to each user based on their purchase count, with the highest purchase counts ranked first.
- Use the DENSE_RANK() window function so that users with the same purchase count receive the same rank, and no ranks are skipped.
- Return these columns: user_id, ab_group, purchase_count, group_purchase_rank.
- Order the results by ab_group and group_purchase_rank.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 4
single