0xaimanMost Traded assets on Sushiswap
    Updated 2022-06-28
    with raw as (with poolname as (select pool_name, count(tx_id) as n_txn from ethereum.dex_swaps where platform='sushiswap' and block_timestamp>='2022-05-05' group by 1 order by 2 desc limit 10)


    select date(block_timestamp) as dt,address_name, from_address,count(tx_id) as n_txn
    from (select block_timestamp, pool_name,direction, address_name , from_address, tx_id
    from ethereum.dex_swaps as swaps inner join ethereum.core.dim_labels l
    on l.address=swaps.token_address
    where platform='sushiswap' and block_timestamp>='2022-05-05')x inner join poolname on poolname.pool_name=x.pool_name
    group by 1,2,3 order by 1)


    select case when address_name='weth' then 'WETH'
    when address_name='hop protocol: usdc l1canonicaltoken' then 'USDC'
    when address_name='hop protocol: usdt l1canonicaltoken' then 'USDT'
    when address_name='terra: luna token' then 'LUNA'
    when address_Name='wormhole: ust token' then'wUST'
    end as symbol

    , avg(n_txn) as avg_txn
    from raw


    group by 1 order by 2 desc

    limit 5
    Run a query to Download Data