Query editor
WITHitems_sold AS (SELECTDATE_TRUNC('{{Interval}}', evt_block_time) AS date,SUM(quantity) AS amount,SUM(quantity * (pricePerItem / CAST(1e18 AS DOUBLE))) AS volumeFROMtreasure_trove_arbitrum.TreasureMarketplaceV2_evt_ItemSoldWHERE(nftAddress = 0x990eb28e378659b93a29d46ff41f08dc6316dd98 OR nftAddress = 0x5d541b55763a9277f61a739f40b6021a16c2d3d8)AND evt_block_time >= CAST('{{Start Date}}' AS TIMESTAMP)GROUP BY1)SELECTitems_sold.date,items_sold.amount,SUM(items_sold.amount) OVER (ORDER BYitems_sold.date NULLS FIRST) AS cumu_items_sold,(SELECTSUM(amount)FROMitems_sold) AS total_items_sold,items_sold.volume,SUM(items_sold.volume) OVER (ORDER BYitems_sold.date NULLS FIRST) AS cumu_volume,(SELECTSUM(volume)FROMitems_sold) AS total_volumeFROMitems_soldORDER BYitems_sold.date NULLS FIRST