with pools as (SELECT DISTINCT POOL_NAME
from ethereum.dex_swaps D
where block_timestamp::date >'2022-01-01'
and platform <>'curve'
and AMOUNT_USD is not NULL
and AMOUNT_USD >10000000
limit 100
)
SELECT block_timestamp::date , platform , sum(AMOUNT_USD)
from ethereum.dex_swaps D , pools P
where block_timestamp::date >'2022-01-01'
and platform <>'curve'
and AMOUNT_USD is not NULL
and D.POOL_NAME <> P.POOL_NAME
and AMOUNT_USD <10000000
group by 1 , 2