Skip to content
Exercise · ClickHouse: Aggregates, Materialized Views, MergeTree Engines · lesson 11 of 12

Exercise: paying users by month

The analysts want to know how many distinct users paid for orders in the app — for any day and any month. The stub already has the table daily_payers on AggregatingMergeTree: one row per day holding the uniqExact state over the user_id of those who paid that day, that is, left a pay event in clicks.