Query editor
WITH Allocation AS (SELECT1673646668 AS total_supply,1673646668 * 0.05 AS s1_allocation, --5% of total supply1673646668 * 0.05 * 0.9 AS p1_allocation, --phase 1 allocation1673646668 * 0.05 * 0.1 AS p2_allocation --phase 2 allocation),ClaimData AS (SELECTMAX(CAST(evt.value AS DOUBLE) / 1e18) AS max_claimed,MIN(CAST(evt.value AS DOUBLE) / 1e18) AS min_claimed,SUM(CAST(evt.value AS DOUBLE) / 1e18) AS total_claimed,COUNT(DISTINCT tx."from") AS unique_walletsFROMethereum.transactions AS txJOINerc20_ethereum.evt_Transfer AS evt ON tx.hash = evt.evt_tx_hashWHEREtx."to" = 0x035bdAeaB85E47710C27EdA7FD754bA80aD4ad02 -- Claim smart contractAND CAST(tx.data AS VARCHAR) LIKE '0x9a15bf92%' -- claim method),AggregatedData AS (SELECTa.total_supply,a.s1_allocation,a.p1_allocation,a.p2_allocation,unique_wallets,COALESCE(cd.total_claimed, 0) AS total_claimed,COALESCE(cd.max_claimed, 0) AS max_claimed,COALESCE(cd.min_claimed, 0) AS min_claimed,COALESCE(cd.total_claimed, 0) / a.p1_allocation * 100 AS claimed_percentage_of_allocation,(100 - (COALESCE(cd.total_claimed, 0) / a.p1_allocation * 100)) AS nonclaimed_percentage_of_allocationFROMAllocation aCROSS JOINClaimData cd),CirculatingSupply AS (SELECT0 AS circulating_supply -- Hardcoded to 0 because tokens are non-transferable currently)SELECTad.*,cs.circulating_supplyFROMAggregatedData ad,CirculatingSupply cs;