Query editor
WITH c AS (SELECT count(*) AS n, sum(cast(amount AS double)) / 1e18 AS gd,count(DISTINCT dropper) AS droppersFROM gooddrops_celo.gooddrops_evt_dropcreated),cl AS (SELECT count(*) AS n, sum(cast(amount AS double)) / 1e18 AS gd,count(DISTINCT claimer) AS huntersFROM gooddrops_celo.gooddrops_evt_dropclaimed),-- Competition prize payouts count as G$ circulation too. Uses the DECODED G$-- transfer table (near real-time) rather than the tokens.transfers spellbook-- (which lags several hours). Prizes go OUT from the prize wallet; that wallet is-- also the gas-faucet/badge relayer, but those are CELO/badge txs — not G$-- transfers — so this captures prize payouts (+ negligible misc) only.pz AS (SELECT coalesce(sum(cast(value AS double)) / 1e18, 0) AS gdFROM gooddollar_celo.supergooddollar_evt_transferWHERE "from" = 0x4412C27Bb9caae546E71Fc3D4cE7F328F11E6605),r AS (SELECT count(*) AS n FROM gooddrops_celo.gooddrops_evt_dropreclaimed),t AS (SELECT avg(date_diff('minute', cr.evt_block_time, x.evt_block_time)) AS avg_minFROM gooddrops_celo.gooddrops_evt_dropclaimed xJOIN gooddrops_celo.gooddrops_evt_dropcreated cr ON cr.dropId = x.dropId)SELECTc.n AS drops_created,cl.n AS drops_claimed,r.n AS drops_reclaimed,round(c.gd, 0) AS gd_dropped,round(cl.gd + pz.gd, 0) AS gd_claimed, -- circulated = claimed by hunters + prize payoutsc.droppers AS unique_droppers,cl.hunters AS unique_hunters,round(100.0 * cl.n / nullif(c.n, 0), 1) AS claim_rate_pct,round(t.avg_min / 60.0, 1) AS avg_hours_to_claimFROM c, cl, r, t, pz