Query editor
with mint as (-- select date_trunc('day', block_time), count(*) as "Mint Num"select date_trunc('day', block_time) as dt, substr(topic2, 13 ) as address, varbinary_to_uint256(data) / 1e18 as amountfrom arbitrum.logswhere topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000and contract_address = 0xc3aBC47863524ced8DAf3ef98d74dd881E131C38),burn as (select date_trunc('day', block_time) as dt, substr(topic2, 13 ) as address, varbinary_to_uint256(data) / 1e18 as amountfrom arbitrum.logswhere topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand topic2 = 0x0000000000000000000000000000000000000000000000000000000000000000and contract_address = 0xc3aBC47863524ced8DAf3ef98d74dd881E131C38),daily_mint as (select dt, sum(amount) as mintedfrom mintgroup by 1),daily_burn as (select dt, -1 * sum(amount) as burnedfrom burngroup by 1),join_list as (select b.dt as dt1, m.dt as dt2, minted, COALESCE(burned, 0) as burnedfrom daily_mint mleft join daily_burn b on m.dt = b.dt)select dt1, dt2, minted, burned, minted + burned as net_mint,sum(minted + burned) over (order by dt2) as cumulative_mintedfrom join_listgroup by 1, 2, 3, 4order by 1 desc