nsa2000Distribution of Users according to Their Claimed Volume
    Updated 2022-11-17
    with t1 as (
    select event_inputs:recipient as Claimer,
    sum (event_inputs:amount/1e18) as Claimed_Volume
    from optimism.core.fact_event_logs
    where origin_to_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
    and origin_function_signature = '0x2e7ba6ef'
    and event_name = 'Claimed'
    group by 1)

    select case when Claimed_Volume < 500 then 'Less Than 500 OP'
    when Claimed_Volume >= 500 and Claimed_Volume < 1000 then '500 - 1000 OP'
    when Claimed_Volume >= 1000 and Claimed_Volume < 5000 then '1000 - 5000 OP'
    when Claimed_Volume >= 5000 and Claimed_Volume < 10000 then '5000 - 10000 OP'
    when Claimed_Volume >= 10000 and Claimed_Volume < 20000 then '10000 - 20000 OP'
    else 'More Than 20000 OP' end as type,
    count (distinct claimer)
    from t1
    group by 1
    order by 2 desc
    Run a query to Download Data