Query editor
WITH address_config AS (SELECT 0x1F1DcfB001b414D523f98105360c07587C72bb0C AS address, 'ToLP1' AS nameUNION ALLSELECT 0x88F566f4Dd0267F93a6a9c9e46d6402000Eb5D7D AS address, 'ToLP2' AS name),-- Get the destination addressdestination AS (SELECT 0x66a9893cc07d91d95644aedd05d03f95e1dba8af AS address, 'Universal Router 4' AS name),-- Query the transactionstransfers AS (SELECTt.block_time,t.block_number,t."from",src.name AS from_name,t."to",dst.name AS to_name,t.value / 1e18 AS eth_value,t.hash AS tx_hashFROM ethereum.transactions tJOIN address_config src ON t."from" = src.addressJOIN destination dst ON t."to" = dst.addressWHERE t.success = true),-- Calculate the total ETH sent to destinationtotal_sent AS (SELECT SUM(eth_value) AS total_eth_sentFROM transfers)-- Final output with named addresses and totalSELECTt.*,ts.total_eth_sent AS total_eth_to_destinationFROM transfers tCROSS JOIN total_sent tsORDER BY t.block_time DESC