Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Window Function Metrics | A/B Test Analysis and Window Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL for Product Analysts

bookChallenge: Window Function Metrics

Oppgave

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.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

close

bookChallenge: Window Function Metrics

Sveip for å vise menyen

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4
single

single

some-alt