nitsSushiswap Top 5 pools by TVL
    Updated 2022-02-12
    with top_5_pools_by_tvl as
    (SELECT pool_name, sum(net_amt)/pow(10,6) as tvl_in_M from
    (select *, case when direction = 'IN' then amount_usd else amount_usd*(-1) end as net_amt from ethereum.dex_swaps
    where platform = 'sushiswap' and amount_usd < pow(10,10))
    GROUP by 1
    order by 2 desc
    limit 5)
    SELECT * from top_5_pools_by_tvl
    Run a query to Download Data