← Retention, funnels, cohorts

Stickiness DAU/MAU TR/web: Feb–May 2025

Level: Senior200 XP

Instructions

A user's active day is a calendar day (event_time::date) on which the user has at least one event. For users from the country 'TR' with platform 'web', for each month from February 1, 2025 to May 31, 2025 inclusive, count avg_dau (the average number of active users per day over all calendar days of the month; days with no active users count as zero in the average; rounded to 2 decimal places), mau (the number of distinct users active on at least one day of the month) and stickiness_pct (the exact, unrounded avg_dau / mau × 100, rounded to 1 decimal place). Do not output months with no active users. Output month (the first day of the month, type date), avg_dau, mau, stickiness_pct. Sort by month.

Hints

Each next one is more detailed and costs more

Log in to open hints

Query

Result

Click Run to see the query result, or Check to submit your solution.

Dataset schema

events.user_id (0…N) ↔ users.id (1…1)purchases.user_id (0…N) ↔ users.id (1…1)eventsPKidintegerFKuser_idintegerpurchasesPKidintegerFKuser_idintegerusersPKidinteger
Exactly oneZero or oneZero or more
Table relationships
  • N:1Many-to-oneevents.user_id → users.id
  • N:1Many-to-onepurchases.user_id → users.id

Table data

PostgreSQL

Select a table in the diagram or list to view its rows.

Dataset schema