-- forked from Ario / Tornado Cash Sanctions - daily addresses and tx from Aug 1st @ https://flipsidecrypto.xyz/Ario/q/sYNJGAJ7BGzC/tornado-cash-sanctions-daily-addresses-and-tx-from-aug-1st
with tornado_addresses as (
select ADDRESS from flipside_prod_db.crosschain.address_labels
where project_name = 'tornado cash')
select
date_trunc('hour', block_timestamp) as date,
count(distinct FROM_ADDRESS) as number_of_addresses,
count(*) as number_of_tx
from ethereum.core.fact_transactions
where TO_ADDRESS in (select address from tornado_addresses)
and STATUS = 'SUCCESS'
and block_timestamp >= '2023-06-01'
group by date