nitsTotal Users in Sushiswap Liquidity Pools
    Updated 2022-02-22
    with txs as (SELECT *,
    CASE when direction = 'IN' then amount_in else amount_out*(-1) end as amt_net,
    CASE when direction = 'IN' then amount_usd else amount_usd*(-1) end as amt_usd_net
    from ethereum.dex_swaps
    where block_timestamp > '2021-01-01' and platform = 'sushiswap')

    SELECT count(distinct from_address)
    as unique_pools,count(distinct to_address)
    as unique_participants , avg(amt_usd_net) as avg_amt_in_usd_per_pool
    from
    (SELECT * from
    (SELECT tx_id as tx,fee_Usd from ethereum.transactions )
    inner join txs
    on tx_id = tx)
    LIMIT 100
    Run a query to Download Data