Moebridges 6
    Updated 2024-07-06
    with prc as (
    select
    hour :: date as date,
    token_address,
    avg(price) as avg_price
    from
    crosschain.price.ez_prices_hourly
    group by
    1,
    2
    ),
    sq_base as (
    select
    t1.*,
    amount * avg_price as amount_usd
    from
    axelar.defi.ez_bridge_squid t1
    left join prc on t1.BLOCK_TIMESTAMP :: date = prc.date
    and t1.token_address = prc.token_address
    where
    BLOCK_TIMESTAMP >= current_date - 180
    order by
    1 desc
    ),
    st_base as (
    select
    t1.*,
    amount * avg_price as amount_usd
    from
    axelar.defi.ez_bridge_satellite t1
    left join prc on t1.BLOCK_TIMESTAMP :: date = prc.date
    and t1.token_address = prc.token_address
    where
    BLOCK_TIMESTAMP >= current_date - 180
    order by
    1 desc
    QueryRunArchived: QueryRun has been archived