MoDeFiNI - withdraw data copy
    Updated 2025-02-10
    with tokens_list as (
    select * from $query('e248c535-501e-445c-9bd6-0492715972ba')),

    near_intents_deposits as (
    select * from $query('49e9b78e-3347-42b9-ad3e-68a36853efd5')),

    near_intents_withdraws as (
    select * from $query('3d6740f5-7fa3-4701-a25d-fd9d22ea5e3c')),

    near_tokens_price as
    (select hour, b.symbol, price
    from near.price.ez_prices_hourly a
    left join tokens_list b
    on contract=TOKEN_ADDRESS
    where contract is not null and a.symbol!='NEAR'
    and hour>='2024-11-01'),

    tokens_price as (
    select hour, a.symbol, price
    from crosschain.price.ez_prices_hourly a
    left join tokens_list
    on contract ilike '%'||a.TOKEN_ADDRESS||'%' and initcap(BLOCKCHAIN)=chain
    where contract is not null
    and chain!='Near'
    and a.symbol not in (select symbol from near_tokens_price)
    and hour>='2024-11-01'
    union
    select hour, 'ETH' as symbol, price
    from crosschain.price.ez_prices_hourly
    where symbol='WETH' and BLOCKCHAIN='ethereum'
    and hour>='2024-11-01'
    union
    select hour, symbol, price
    from solana.price.ez_prices_hourly a
    where TOKEN_ADDRESS in ('EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm','6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN','FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P',
    'So11111111111111111111111111111111111111112', 'ukHH6c7mMyiWCf1b9pnWe25TSpkDDt3H5pQZgZ74J82')
    QueryRunArchived: QueryRun has been archived