Query editor
with earliest_date as (selectmin(created_at) as first_datefrom tokens_solana.fungiblewhere token_mint_address = '2u1tszSeqZ3qBWF3uNGPFc8TzMk2tdiwknnRMWGWjGWH'),date_sequence as (selectdate(day) as dayfrom earliest_date,-- unnest(sequence(date('2025-02-15'), date_trunc('day', current_date), interval '1' day)) as t(day)unnest(sequence(date(first_date), date_trunc('day', current_date), interval '1' day)) as t(day)),mint_burn_event as (selectblock_date,action,sum(amount) as amtfrom tokens_solana.transferswhere token_mint_address = '2u1tszSeqZ3qBWF3uNGPFc8TzMk2tdiwknnRMWGWjGWH'and cast(block_date as date) >= cast ((selectmin(created_at) as first_datefrom tokens_solana.fungiblewhere token_mint_address = '2u1tszSeqZ3qBWF3uNGPFc8TzMk2tdiwknnRMWGWjGWH') as date)and action in ('mint','burn')group by block_date, actionorder by block_date desc, action)selectdates.day,coalesce(mints.amt, 0) / pow(10, 6) as "mint volume",-coalesce(burns.amt, 0) / pow(10, 6) as "burn volume",cast(coalesce(mints.amt, 0) as bigint) - cast(coalesce(burns.amt, 0) as bigint) as "net supply change",sum(cast(coalesce(mints.amt, 0) as bigint) / pow(10, 6)- cast(coalesce(burns.amt, 0) as bigint) / pow(10, 6)) over (order by dates.dayrows between unbounded preceding and current row) as "cumulative supply over time",sum(cast(coalesce(mints.amt, 0) as bigint) / pow(10, 6) / 1000000- cast(coalesce(burns.amt, 0) as bigint) / pow(10, 6) / 1000000) over (order by dates.dayrows between unbounded preceding and current row) as "cumulative supply over time (million)"from date_sequence as datesleft join mint_burn_event as mints