MLDZMNsne13
    Updated 2023-02-26
    with t2 as (select
    TIMESTAMP::date as day,
    avg(PRICE_USD) as price
    from near.core.fact_prices
    where SYMBOL ilike '%near%'
    group by 1 )

    select
    distinct SYMBOL_IN,
    count(distinct tx_hash) as swap,
    count(distinct ORIGIN_FROM_ADDRESS) as swappers,
    sum(AMOUNT_OUT*price) as volume_usd,
    row_number() over (order by volume_usd desc) as rank1
    from ethereum.core.ez_dex_swaps s left join t2 a on s.BLOCK_TIMESTAMP::date=a.day
    where (SYMBOL_OUT='NEAR')
    group by 1
    Run a query to Download Data