0-MIDuser type eth 2024-br
    Updated 2025-01-20

    with act1 as (
    select date_trunc('day',BLOCK_TIMESTAMP) as day
    ,count(distinct ORIGIN_FROM_ADDRESS) as total_users
    from ethereum.core.ez_decoded_event_logs
    where EVENT_NAME='LiFiTransferStarted'
    and DECODED_LOG:bridgeData:integrator='jumper.exchange'
    and ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    and BLOCK_TIMESTAMP::date>=current_date-180
    group by 1
    ),
    act2 as (
    with tab1 as (
    select ORIGIN_FROM_ADDRESS
    ,min(BLOCK_TIMESTAMP::date) as first_time
    from ethereum.core.ez_decoded_event_logs
    where EVENT_NAME='LiFiTransferStarted'
    and DECODED_LOG:bridgeData:integrator='jumper.exchange'
    and ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    group by 1)
    select date_trunc('day',first_time) as day
    ,count(distinct ORIGIN_FROM_ADDRESS) as new_bridgers
    from tab1
    group by 1
    )
    select
    act1.day
    ,new_bridgers
    ,total_users-new_bridgers as active_bridgers
    ,sum(new_bridgers)over(order by act1.day) as total_new_bridgers
    from act1
    left join act2
    on act1.day=act2.day



    QueryRunArchived: QueryRun has been archived