Query editor
-- BAYC (0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d)-- Dune (DuneSQL). Run each query in its OWN query tab — Dune allows one statement per query.-- No trailing semicolons.-- ================================================================-- QUERY 1: Dormancy buckets (time since each ape's last transfer)-- ================================================================WITH transfers AS (SELECTbytearray_to_uint256(topic3) AS token_id,bytearray_substring(topic2, 13, 20) AS to_addr,block_time,ROW_NUMBER() OVER (PARTITION BY bytearray_to_uint256(topic3)ORDER BY block_number DESC, "index" DESC) AS rnFROM ethereum.logsWHERE contract_address = 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13dAND topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef),last_moves AS (SELECTtoken_id,to_addr AS current_owner,block_time AS last_transfer_time,date_diff('day', block_time, NOW()) / 365.25 AS years_dormantFROM transfersWHERE rn = 1)SELECTCASEWHEN current_owner IN (0x000000000000000000000000000000000000dead,0x0000000000000000000000000000000000000000) THEN '00. burned'WHEN current_owner = 0x29469395eaf6f95920e59f858042f0e28d98a20bTHEN '01. staked: Blur Blend'WHEN current_owner = 0x68a24ab6dc7e2f8dedd2993eb178a68e0b7473d4THEN '02. staked: Yuga Labs Floor Liquidity'WHEN current_owner = 0xaaa2da255df9ee74c7075bcb6d81f97940908a5dTHEN '03. staked: BendDAO NFT Vault'WHEN current_owner = 0xed216b45b6e66847aaa891e5be124e0ab2c60a41THEN '04. staked: Vault NFT'WHEN current_owner = 0xea47b64e1bfccb773a0420247c0aa0a3c1d2e5c5THEN '05. staked: NFTX vault'WHEN years_dormant >= 5 THEN '11. not moved in 5+ years'WHEN years_dormant >= 4 THEN '10. not moved in 4-5 years'WHEN years_dormant >= 3 THEN '09. not moved in 3-4 years'WHEN years_dormant >= 2 THEN '08. not moved in 2-3 years'WHEN years_dormant >= 1 THEN '07. not moved in 1-2 years'ELSE '06. moved within last year'END AS category,COUNT(*) AS apesFROM last_movesGROUP BY 1ORDER BY 1-- ================================================================-- QUERY 2: Apes "staked" — deposited in platform contracts-- (Blur/Blend escrow, Cyan vaults, BendDAO, NFTX, etc.)