Query editor
-- HONEY: Monthly minted supply (mints - burns) from Jan 2023 to present-- Mint: 4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTyWITH params AS (SELECT '4vMsoUT2BWatFweudnQM1xedRLfJgJ7hswhcpz4xgBTy' AS honey_mint),-- token decimals for human-readable valuestoken_info AS (SELECT tm.mint, tm.decimalsFROM solana.token_mints tmJOIN params p ON tm.mint = p.honey_mint),-- monthly net token_balance_change for the mint (can be + for mint, - for burn)monthly_raw AS (SELECTdate_trunc('month', aa.block_time) AS month,SUM(aa.token_balance_change) AS delta_unitsFROM solana.account_activity aaJOIN params p ON aa.token_mint_address = p.honey_mintWHERE aa.token_balance_change IS NOT NULLGROUP BY 1),-- generate a continuous month series so months with 0 net-change still appearmonths AS (SELECT generate_series(date '2023-01-01', date_trunc('month', current_date), interval '1 month') AS month),-- left-join to ensure every month from Jan 2023 appearsmonthly AS (SELECTm.month,COALESCE(r.delta_units, 0) AS delta_unitsFROM months mLEFT JOIN monthly_raw r ON r.month = m.month),-- cumulative (running total) of net minted units (units = raw token base units)supply_over_time AS (SELECTmonth,SUM(delta_units) OVER (ORDER BY month) AS cumulative_unitsFROM monthly)-- final human-readable output (adjust for decimals)SELECTs.month,s.cumulative_units / POW(10, t.decimals) AS minted_supplyFROM supply_over_time sCROSS JOIN token_info tORDER BY s.month;