with top10 as (select count(1),FROM_ADDRESS
from optimism.core.fact_transactions
where to_date(BLOCK_TIMESTAMP) > '2022-06-30' and to_date(BLOCK_TIMESTAMP) <= '2022-07-31' and STATUS='SUCCESS'
group by 2
order by 1 desc
limit 10)
select count(1),FROM_ADDRESS,to_date(BLOCK_TIMESTAMP)
from optimism.core.fact_transactions
where to_date(BLOCK_TIMESTAMP) > '2022-06-30' and to_date(BLOCK_TIMESTAMP) <= '2022-07-31' and STATUS='SUCCESS'
and FROM_ADDRESS in (select FROM_ADDRESS from top10)
group by 2,3