Query editor
WITHrelayer_metrics AS (SELECTrelayer,blockchain,currency_symbol,tornado_version,COUNT(*) AS total_withdrawals,COUNT(DISTINCT recipient) AS unique_recipients,SUM(amount) AS total_amount,SUM(fee) AS total_fees_collected,AVG(fee) AS avg_fee_per_withdrawal,MIN(block_time) AS first_seen,MAX(block_time) AS last_seenFROM(SELECT*FROMtornado_cash.withdrawalsUNION ALLSELECT*FROMtornado_cash_ethereum.withdrawalsUNION ALLSELECT*FROMtornado_cash_bnb.withdrawalsUNION ALLSELECT*FROMtornado_cash_avalanche_c.withdrawalsUNION ALLSELECT*FROMtornado_cash_polygon.withdrawalsUNION ALLSELECT*FROMtornado_cash_gnosis.withdrawalsUNION ALLSELECT*FROMtornado_cash_optimism.withdrawalsUNION ALLSELECT*FROMtornado_cash_arbitrum.withdrawals) AS all_withdrawalsWHERENOT relayer IS NULLGROUP BY1,