Monthly active users (SQL)
select date_trunc('month', created_at) as month,
count(distinct user_id) as active_users,
count(*) as total_pastes
from pastes
where created_at >= now() - interval '6 months'
and user_id is not null
group by 1
order by 1 desc;