Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Retention Matrix | Retention and Churn Analysis
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL for Product Analysts

bookChallenge: Retention Matrix

Oppgave

Swipe to start coding

You are analyzing user retention by signup cohorts. Your goal is to summarize how many users from each signup cohort return in each subsequent week after their signup date.

Write a SQL query that:

  • For each user cohort, defined by users.signup_date, calculates the number of distinct users who logged in during each week after their signup date.
  • Outputs the following columns:
    • cohort_start: the signup_date of the cohort;
    • week_number: the number of weeks after signup (0 for the signup week);
    • retained_users: the count of distinct users active in that week.
  • Uses only the provided users and logins tables.
  • Orders results by cohort_start and week_number.

This matrix will help you visualize retention trends by cohort and week. Do not use the exact code from the examples above, but apply the same concepts to solve the task.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 6
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: Retention Matrix

Sveip for å vise menyen

Oppgave

Swipe to start coding

You are analyzing user retention by signup cohorts. Your goal is to summarize how many users from each signup cohort return in each subsequent week after their signup date.

Write a SQL query that:

  • For each user cohort, defined by users.signup_date, calculates the number of distinct users who logged in during each week after their signup date.
  • Outputs the following columns:
    • cohort_start: the signup_date of the cohort;
    • week_number: the number of weeks after signup (0 for the signup week);
    • retained_users: the count of distinct users active in that week.
  • Uses only the provided users and logins tables.
  • Orders results by cohort_start and week_number.

This matrix will help you visualize retention trends by cohort and week. Do not use the exact code from the examples above, but apply the same concepts to solve the task.

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 2. Kapittel 6
single

single

some-alt