mlhbridge from aura to near
    Updated 2022-07-12
    with a2n as(

    select
    txn_hash,
    date_trunc('day',block_timestamp) as days,
    parse_json((parse_json(args)):msg):actions[0]:min_amount_out*1e-24 as near_volume_nulls,
    case when near_volume_nulls is null then 0
    else near_volume_nulls
    end as near_volume
    from flipside_prod_db.mdao_near.actions_events_function_call
    where args ilike '%receiver_id%v1.jumbo_exchange.near%'
    and args not like '%receiver_id%farming%v1.jumbo_exchange.near%'
    and days > CURRENT_DATE - 90
    )

    select
    days,
    count(distinct txn_hash) as count_of_bridges,
    sum(near_volume) as aura_to_near_volume
    from a2n
    group by 1
    Run a query to Download Data