0-MIDvolume and sypply on last 24h
    Updated 2024-09-05

    with tab1 as (
    select
    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'
    ),
    tab2 as (
    select BLOCK_TIMESTAMP::date as day
    ,ORIGIN_FROM_ADDRESS
    ,DECODED_LOG:mintAmount/1e6 as volume
    ,TX_HASH
    from base.core.ez_decoded_event_logs
    where ORIGIN_TO_ADDRESS='0xedc817a28e8b93b03976fbd4a3ddbc9f7d176c22'
    and EVENT_NAME='Mint'
    and CONTRACT_NAME='Moonwell USDC'
    and BLOCK_TIMESTAMP::date>=current_date-1
    )
    select day
    ,sum(volume) as Value
    ,count(distinct TX_HASH) as supplies
    ,sum(Value)over(order by day) as "Total Volume"
    ,sum(supplies)over(order by day) as "Total Supplies"
    from tab1
    left join tab2
    on tab1.ORIGIN_FROM_ADDRESS=tab2.ORIGIN_FROM_ADDRESS
    where day is not null
    group by 1


    QueryRunArchived: QueryRun has been archived