SocioAnalyticaSquid: transfer size over time copy
    Updated 2024-10-20
    with squid as (
    SELECT CASE
    when token_symbol IN ('WMAI','axlWMAI') then 'MAI'
    when token_symbol = 'axlATOM' then 'ATOM'
    when token_symbol = 'axlDEUS' then 'DEUS'
    when token_symbol = 'axlMATIC' then 'MATIC'
    when token_symbol = 'axlwstETH' then 'ETH'
    when token_symbol = 'axlKNC' then 'KNC'
    when token_symbol = 'axlFIL' then 'FIL'
    when token_symbol = 'axlBAL' then 'BAL'
    when token_symbol = 'axlPEPE' then 'PEPE'
    else token_symbol end as symbols,
    tx_hash,
    block_timestamp,
    sender,
    amount,
    source_chain,
    destination_chain,
    receiver
    FROM axelar.defi.ez_bridge_squid

    )
    ,
    main as (
    SELECT
    a.* , amount*b.usd_price as amount_usd
    FROM squid a
    LEFT JOIN (
    SELECT
    symbol,
    price as usd_price
    FROM crosschain.price.ez_prices_hourly
    qualify row_number()over (partition by symbol order by hour DESC) = 1
    ) b
    ON
    a.symbols = b.symbol
    QueryRunArchived: QueryRun has been archived