Query editor
-- Comprehensive Owner Actions with ENS Names and LabelsWITH all_addresses AS (SELECT DISTINCT "from" as address FROM erc20_ethereum.evt_TransferWHERE contract_address = 0xc11158c5da9db1d553ed28f0c2ba1cbedd42cfcbAND "from" != 0x0000000000000000000000000000000000000000UNIONSELECT DISTINCT "to" as address FROM erc20_ethereum.evt_TransferWHERE contract_address = 0xc11158c5da9db1d553ed28f0c2ba1cbedd42cfcbAND "to" != 0x0000000000000000000000000000000000000000),-- ENS Names lookupens_names AS (SELECTaddress,name as ens_nameFROM ens.resolver_latestWHERE address IN (SELECT address FROM all_addresses)),-- Manual Labels lookup (most reliable)dune_labels AS (SELECTaddress,label_name,label_categoryFROM (VALUES-- Major CEX addresses with labels(0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE, 'Binance Hot Wallet', 'cex'),(0xD551234Ae421e3BCBA99A0Da6d736074f22192FF, 'Binance Hot Wallet', 'cex'),(0x564286362092D8e7936f0549571a803B203aAceD, 'Binance Hot Wallet', 'cex'),(0xF977814e90dA44bFA03b6295A0616a897441aceC, 'Binance Hot Wallet', 'cex'),(0x503828976D22510aad0201ac7EC88293211D23Da, 'Coinbase Institutional', 'cex'),(0xddfAbCdc4D8FfC6d5beaf154f18B778f892A0740, 'Coinbase Hot Wallet', 'cex'),(0x267be1C1D684F78cb4F6a176C4911b741E4Ffdc0, 'Kraken Hot Wallet', 'cex'),(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'Uniswap V2 Router', 'dex'),(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45, 'Uniswap V3 Router', 'dex'),(0xE592427A0AEce92De3Edee1F18E0157C05861564, 'Uniswap V3 Router', 'dex'),(0x1111111254EEB25477B68fb85Ed929f73A960582, '1inch Router v4', 'dex'),(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 'WETH Contract', 'defi')) AS t(address, label_name, label_category)WHERE address IN (SELECT address FROM all_addresses)),address_balances AS (SELECTaddress,SUM(amount_change) as current_balance,MAX(running_balance) as max_balance_ever,MIN(first_interaction) as first_acquired_date,SUM(total_acquired) as total_acquired,SUM(total_sent) as total_dumped,COUNT(*) as total_transactionsFROM (SELECT"to" as address,value as amount_change,SUM(value) OVER (PARTITION BY "to" ORDER BY evt_block_time) as running_balance,MIN(evt_block_time) OVER (PARTITION BY "to") as first_interaction,