hessTotal II
    Updated 2024-07-18
    with token_bonk_i as ( Select VALUE:"DECIMAL" as decimal,
    value:"TOKEN_ADDRESS" as token_address,
    value:"TOKEN_NAME" as token_name
    from (
    SELECT livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/v1/queries/afb49a72-5616-4521-bc64-019467ed698b/data/latest') as resp
    )
    ,LATERAL FLATTEN (input => resp:data))
    ,
    price_II as ( select hour::date as day,
    symbol,
    avg(price) as avg_price
    from crosschain.price.ez_prices_hourly
    group by 1,2
    )
    ,
    price_sei as (select RECORDED_HOUR::date as day,
    'usei' as symbol,
    avg(price) as avg_price
    from osmosis.price.ez_prices
    where symbol = 'SEI'
    group by 1,2)
    ,
    from_address as (sELECT VALUE as source_chain,
    created_at,
    id,
    amount as amount_column,
    FROM axelar.axelscan.fact_gmp,
    LATERAL FLATTEN(PARSE_JSON(call)) flattened_data
    where path = 'chain'
    )
    ,
    sender as (SELECT a.created_at,
    a.id,
    b.source_chain,
    max(amount_column) as amt_column,
    QueryRunArchived: QueryRun has been archived