Query editor
withraw as (selectdate_trunc('day', evt_block_time) as mydate,CAST(amount0 / 1e6 as INT) as amount0,CAST(amount1 / 1e18 as INT) as amount1fromuniswap_v3_ethereum.Pair_evt_Mintwherecontract_address = 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640union allselectdate_trunc('day', evt_block_time) as mydate,- CAST(amount0 / 1e6 as INT) as amount0,- CAST(amount1 / 1e18 as INT) as amount1fromuniswap_v3_ethereum.Pair_evt_Burnwherecontract_address = 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640),total as (selectmydate,sum(amount0) as total0,sum(amount1) as total1fromrawgroup bymydate),ethpriceRaw as (selectdate_trunc('day', minute) as mydate,pricefromprices.usdwheresymbol = 'WETH'),ethprice as (selectmydate,AVG(price) as pricefromethpriceRawgroup bymydate),calc as (selecttotal.mydate,total.total0,total.total1,total.total0 + total.total1 * ethprice.price as netUSDfromtotaljoin ethprice on total.mydate = ethprice.mydate)selectmydate,