select
number_of_times,
count(number_of_times) as frequency
from
(
select
origin_address,
count(origin_address) as number_of_times
from
(
select
distinct date_trunc('week', block_timestamp) as blocktime,
origin_address
from
ethereum.udm_events
where
contract_address = '0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa'
)
group by
origin_address
)
group by
number_of_times
order by
number_of_times