Query editor
WITH airdrop_recipients AS (SELECT"to" AS wallet,SUM(CAST(value AS DOUBLE)) / 1e18 AS airdrop_amountFROM erc20_ethereum.evt_TransferWHERE contract_address = 0x910812c44ed2a3b611e4b051d9d83a88d652e2ddAND "from" = 0x0000000000000000000000000000000000000000GROUP BY "to"),activity AS (SELECTar.wallet,ar.airdrop_amount,COALESCE(SUM(CASEWHEN t."to" = ar.walletAND t."from" != 0x0000000000000000000000000000000000000000THEN CAST(t.value AS DOUBLE)ELSE 0END) / 1e18, 0) AS total_bought,COALESCE(SUM(CASEWHEN t."from" = ar.walletAND t."to" != 0x0000000000000000000000000000000000000000THEN CAST(t.value AS DOUBLE)ELSE 0END) / 1e18, 0) AS total_soldFROM airdrop_recipients arLEFT JOIN erc20_ethereum.evt_Transfer tON (t."to" = ar.wallet OR t."from" = ar.wallet)AND t.contract_address = 0x910812c44ed2a3b611e4b051d9d83a88d652e2ddGROUP BY ar.wallet, ar.airdrop_amount),categorized AS (SELECTCASEWHEN total_sold <= 0 AND total_bought > 0THEN 'Accumulator'WHEN total_sold <= 0 AND total_bought <= 0THEN 'Untouched'WHEN total_bought > 0 AND (airdrop_amount + total_bought - total_sold) > airdrop_amountTHEN 'Net Accumulator'WHEN (airdrop_amount + total_bought - total_sold) >= airdrop_amount * 0.9THEN 'Diamond Hands (90%+)'WHEN (airdrop_amount + total_bought - total_sold) >= airdrop_amount * 0.5THEN 'Partial Seller'WHEN (airdrop_amount + total_bought - total_sold) > 0THEN 'Mostly Sold'ELSE 'Fully Dumped'END AS behaviorFROM activity)SELECTbehavior,COUNT(*) AS wallet_count,ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pctFROM categorizedGROUP BY behaviorORDER BY wallet_count DESC;