← Retention, funnels, cohorts

DAU/MAU of clients from 'Новосибирск', vip: Aug–Nov 2025

Level: Senior200 XP

Instructions

A client's transaction is any transactions record on any of the client's accounts (accounts.client_id). A client is active on a day if they have at least one transaction on that calendar day (tx_time::date). For clients from the city 'Новосибирск' with segment 'vip', for each month from August 1, 2025 to November 30, 2025 inclusive, count avg_dau (the average number of active clients per day over all calendar days of the month; days without transactions count as zero; rounded to 2 decimal places), mau (the number of distinct clients 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 clients. 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

accounts.client_id (0…N) ↔ clients.id (1…1)transactions.account_id (0…N) ↔ accounts.id (1…1)accountsPKidintegerFKclient_idintegerclientsPKidintegertransactionsPKidintegerFKaccount_idinteger
Exactly oneZero or oneZero or more
Table relationships
  • N:1Many-to-oneaccounts.client_id → clients.id
  • N:1Many-to-onetransactions.account_id → accounts.id

Table data

PostgreSQL

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

Dataset schema