Query editor
WITH titan_blocks AS (SELECT number as block_number FROM ethereum.blocksWHERE date >= current_date - interval '{{days_back}}' day AND miner = 0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97),eth_transfers AS (SELECT block_number, "from", "to", value FROM ethereum.tracesWHERE block_date >= current_date - interval '{{days_back}}' dayAND value > 0 AND (call_type != 'delegatecall' OR call_type IS NULL) AND success AND tx_success),paid_to_titan AS (SELECT et."from" as counterparty, sum(et.value)/1e18 as gross_paid_to_titan_eth, count(*) as n_paymentsFROM titan_blocks tb JOIN eth_transfers et ON et.block_number = tb.block_numberWHERE et.to = 0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97GROUP BY 1)SELECTp.counterparty,coalesce(mev.alias, rl.frontend, 'Unidentified') as identity,coalesce(mev.comment, rl.type, '') as category,p.gross_paid_to_titan_eth,p.n_paymentsFROM paid_to_titan pLEFT JOIN query_3375615 mev ON mev.address = p.counterpartyLEFT JOIN query_3004150 rl ON rl.address = p.counterpartyORDER BY p.gross_paid_to_titan_eth DESCLIMIT 50