Query editor
WITH counterparty_data AS (SELECTCASEWHEN "from" = 0xe3c44d4d25172ef2e0cdb9e09189a8ca4ed878f4 THEN "to"ELSE "from"END as counterparty,CASEWHEN "from" = 0xe3c44d4d25172ef2e0cdb9e09189a8ca4ed878f4 THEN 'SENT'ELSE 'RECEIVED'END as direction,COUNT(*) as tx_count,SUM(value / 1e18) as total_eth,MIN(block_time) as first_tx,MAX(block_time) as last_txFROM ethereum.transactionsWHERE ("to" = 0xe3c44d4d25172ef2e0cdb9e09189a8ca4ed878f4OR "from" = 0xe3c44d4d25172ef2e0cdb9e09189a8ca4ed878f4)AND success = trueAND value > 0GROUP BY 1, 2)SELECTcounterparty as "Address",direction as "Direction",tx_count as "Transaction Count",ROUND(total_eth, 4) as "Total ETH",ROUND(total_eth / tx_count, 4) as "Avg per Transaction",first_tx as "First Transaction",last_tx as "Last Transaction",CASEWHEN counterparty = 0x00000000219ab540356cBB839Cbe05303d7705Fa THEN 'Beacon Deposit Contract'WHEN counterparty = 0x0000000000000000000000000000000000000000 THEN 'Burn Address'ELSE 'Regular Address'END as "Type"FROM counterparty_dataORDER BY total_eth DESCLIMIT 30;