0-MIDdis volume base
    Updated 2024-05-12

    with tab1 as (
    select
    TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from base.core.ez_decoded_event_logs
    where EVENT_NAME='LiFiTransferStarted'
    and DECODED_LOG:bridgeData:integrator='jumper.exchange'
    and ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    and DECODED_LOG:bridgeData:destinationChainId=34443
    ),
    tab2 as (
    select case
    when AMOUNT_USD>0 and AMOUNT_USD<10 then 'Below 10 $'
    when AMOUNT_USD>=10 and AMOUNT_USD<=100 then '10~100 $'
    when AMOUNT_USD>100 and AMOUNT_USD<=1000 then '100~1K $'
    when AMOUNT_USD>1000 and AMOUNT_USD<=10000 then '1K~10K $'
    when AMOUNT_USD>10000 then 'Up To 10K $' end as dis_volume
    ,TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from base.core.ez_token_transfers
    where ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    --and ORIGIN_FROM_ADDRESS=FROM_ADDRESS
    and AMOUNT_USD is not null
    )
    select dis_volume
    ,count(distinct tab2.TX_HASH) as bridges
    ,count(distinct tab2.ORIGIN_FROM_ADDRESS) as bridgers
    from tab1
    left join tab2
    on tab1.TX_HASH=tab2.TX_HASH
    and tab1.ORIGIN_FROM_ADDRESS=tab2.ORIGIN_FROM_ADDRESS
    group by 1

    QueryRunArchived: QueryRun has been archived