with swap_txs_uniswap as (select pool_name, count(distinct tx_id) as num_txs
from ethereum.dex_swaps
where block_timestamp::date >= '2022-02-24' and block_timestamp::date <= '2022-04-15'
and (platform like '%uniswap%')
and amount_usd is not null
group by 1
order by num_txs desc
limit 10)
select block_timestamp::date as dt, pool_name, count(distinct tx_id) as num_txs
from ethereum.dex_swaps
where block_timestamp::date >= '2022-02-24' and block_timestamp::date <= '2022-04-15'
and (platform like '%uniswap%')
and amount_usd is not null
and pool_name in (select pool_name from swap_txs_uniswap )
group by 1, 2