Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende 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

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 4
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Window Function Metrics

Desliza para mostrar el menú

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 4
single

single

some-alt