Query editor
withmint_burn as (selectevt_block_time as time,cast(value as double) / 1e18 as mint,0 as burn,0 as redeemfromliquity_ethereum.LUSD_evt_Transferwhere"from" = 0x0000000000000000000000000000000000000000union allselectevt_block_time,0,cast(value as double) / 1e18,0fromliquity_ethereum.LUSD_evt_Transferwhereto = 0x0000000000000000000000000000000000000000union allselectevt_block_time,0,0,cast(_actualLUSDAmount as double) / 1e18from liquity_ethereum.TroveManager_evt_Redemption),sampling as (selectdate_trunc('day', time) as time,sum(mint) as mint,sum(burn) as burn,sum(redeem) as redeemfrommint_burngroup by1),lusd as (selectdate_trunc('day', minute) as time,avg(price) as pricefromprices.usdwherecontract_address = 0x5f98805A4E8be255a32880FDeC7F6728C6568bA0 -- LUSDgroup by 1)selecttime,sum(mint) over time as cume_minted,sum(burn) over time as cume_burned,sum(redeem) over time as cume_redeemed,1 as peg,lusd.price as lusd_pricefromsamplingleft join lusd using (time)