select
date_trunc('month',block_timestamp) as month,
case when to_label_type is null then 'other user' else to_label_type end as entity_type,
count(distinct tx_id) as n_transactions,
sum(amount_usd) as amount_transferred_usd
from ethereum.udm_events
where block_timestamp >= '2020-08-01'
and amount_usd < 1000000000
group by 1, 2
order by 1 desc, 3 desc;