LordkingSquid bridge
    Updated 2024-07-02

    with

    satellite as
    (select
    distinct BLOCK_TIMESTAMP ,
    TX_HASH,
    SOURCE_CHAIN ,
    SENDER ,
    DESTINATION_CHAIN ,
    RECEIVER,
    TOKEN_ADDRESS ,
    TOKEN_SYMBOL ,
    AMOUNT
    FROM axelar.defi.ez_bridge_squid
    )
    ,period as (
    select
    '1 day' as period,
    count(distinct tx_hash) as transactions,
    count(distinct SENDER) as senders,
    count(distinct RECEIVER) as receiver,
    count(distinct TOKEN_ADDRESS) as tokens,
    round(sum(case when TOKEN_SYMBOL ilike '%usd%' then AMOUNT else 0 end)) as stable_volume
    from satellite
    WHERE BLOCK_TIMESTAMP::date> current_date - 1
    group by 1
    union all
    select
    '7 day' as period,
    count(distinct tx_hash) as transactions,
    count(distinct SENDER) as senders,
    count(distinct RECEIVER) as receiver,
    count(distinct TOKEN_ADDRESS) as tokens,
    QueryRunArchived: QueryRun has been archived