Eman-RazClassification of Receivers Based on Transfers Count
    Updated 2023-02-21
    with tab1 as (select receiver, count(distinct tx_id) as tx_count, case
    when count(distinct tx_id)=1 then 'n=1'
    when count(distinct tx_id)=2 then 'n=2'
    when count(distinct tx_id)=3 then 'n=3'
    when count(distinct tx_id)=4 then 'n=4'
    when count(distinct tx_id)=5 then 'n=5'
    when count(distinct tx_id)>5 and count(distinct tx_id)<=10 then '5<n<=10'
    when count(distinct tx_id)>10 and count(distinct tx_id)<=50 then '10<n<=50'
    when count(distinct tx_id)>50 and count(distinct tx_id)<=100 then '50<n<=100'
    when count(distinct tx_id)>100 and count(distinct tx_id)<=500 then '100<n<=500'
    when count(distinct tx_id)>500 and count(distinct tx_id)<=1000 then '500<n<=1000'
    when count(distinct tx_id)>1000 then 'n>1000'
    end as "Class"
    from cosmos.core.fact_transfers
    where tx_succeeded='TRUE' and block_timestamp::date>='2023-01-01'
    group by 1)

    select "Class", count(distinct receiver) as "Receiver Count"
    from tab1
    group by 1
    order by 1
    Run a query to Download Data