Query editor
withlpt_mints as (SELECT(value / 1e18) as minted,DATE_TRUNC('{{time_period}}', evt_block_time) as epochFROMerc20_{{chain}}.evt_transferWHEREcontract_address = from_hex(SUBSTRING('{{vault}}', 1, 42))AND "from" = 0x0000000000000000000000000000000000000000ORDER byevt_block_time),lpt_burns as (SELECT(- value / 1e18) as burned,DATE_TRUNC('{{time_period}}', evt_block_time) as epochFROMerc20_{{chain}}.evt_transferWHEREcontract_address = from_hex(SUBSTRING('{{vault}}', 1, 42))AND "to" = 0x0000000000000000000000000000000000000000ORDER byevt_block_time),lpt_ep_mint as (SELECTsum(minted) as minted,0 as burned,epochfromlpt_mintsGROUP byepoch),lpt_ep_burn as (SELECT0 as minted,sum(burned) as burned,epochfromlpt_burnsGROUP byepoch),fullset as (SELECTCOALESCE(lpt_ep_mint.epoch, lpt_ep_burn.epoch) as epoch,COALESCE(lpt_ep_mint.minted, 0) as minted,COALESCE(lpt_ep_burn.burned, 0) as burned,COALESCE(lpt_ep_mint.minted, 0) + COALESCE(lpt_ep_burn.burned, 0) as net_change,sum(COALESCE(lpt_ep_mint.minted, 0) + COALESCE(lpt_ep_burn.burned, 0)) over (ORDER byCOALESCE(lpt_ep_mint.epoch, lpt_ep_burn.epoch)) as supply,SUBSTRING('{{vault}}', 44, 100) as nameFROMlpt_ep_mint