Monitize AIBlock 3 (Claimers Distribution)
    Updated 2024-07-15
    select
    case
    when Claimed_amount < 150 then '1. Shrimp(<150)'
    when Claimed_amount > 150 and Claimed_amount <= 300 then '2. Crab(150~300)'
    when Claimed_amount > 300 and Claimed_amount <= 1000 then '3. Octopus(300~1k)'
    when Claimed_amount > 1000 and Claimed_amount <= 5000 then '4. Fish(1k~5k)'
    when Claimed_amount > 5000 and Claimed_amount <= 10000 then '5. Dolphin(5k~10k)'
    when Claimed_amount > 10000 and Claimed_amount <= 100000 then '6. Shark(10k~100K)'
    else '7. Whale(>100K)' end as type,
    count(distinct claimers) as users,
    sum(Claimed_amount) as total_Claimed_amount
    from(
    Select
    distinct TO_ADDRESS as claimers ,
    sum(amount) as Claimed_amount
    --rank() over(order by Claimed_amount desc) as rank
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x8fc17671D853341D9e8B001F5Fc3C892d09CB53A')
    and FROM_ADDRESS in ('0x97d7915ee95ed700d4499f702c8e3c7fd12e431b','0x3d577e5aad32b8e9b5b8824fc824d86d09383b4c')
    and ORIGIN_FUNCTION_SIGNATURE = '0x5eddd157'
    group by 1

    UNION

    Select
    distinct TO_ADDRESS as claimers ,
    sum(amount) as Claimed_amount
    --rank() over(order by Claimed_amount desc) as rank
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x8fc17671D853341D9e8B001F5Fc3C892d09CB53A')
    and FROM_ADDRESS = lower('0xb1371882a69f7d9b2cd3c2a02b47f51b107ee5d7')
    group by 1
    )
    group by 1
    order by 1 asc

    QueryRunArchived: QueryRun has been archived