Updated 2024-09-29
    -- For ethereum
    with transactions as (
    select
    origin_from_address as address,
    count( distinct tx_hash) as transaction
    from ethereum.core.ez_decoded_event_logs
    where origin_to_address = lower('0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE')
    or decoded_log:bridgeData:integrator = 'jumper.exchange'
    or decoded_log:integrator = 'jumper.exchange'
    And event_name in ('LiFiGenericSwapCompleted','LiFiTransferStarted','LiFiSwappedGeneric')
    group by address
    ),
    ranges as (
    select
    case
    when transaction between 1 and 9 then '1 - 10'
    when transaction between 10 and 49 then '10 - 50 '
    when transaction between 50 and 99 then '50 - 100 '
    when transaction between 100 and 149 then '100 - 500'
    else '500 and above'
    end
    as range
    from transactions
    )

    select
    count(range) as Address,
    range as transaction_range
    from ranges
    group by range
    order by 2



    QueryRunArchived: QueryRun has been archived