Query editor
with prep as (select DATE_TRUNC('{{Aggregate by}}', block_date) AS aggregate_by,content.appCode AS app_code,content.metadata.widget.appCode as widget_app_code,content.metadata.widget.environment as widget_environment,sum(usd_value) as volumefrom cow_protocol_ethereum.trades tJOIN cowswap.raw_app_data adON app_data = from_hex(app_hash)WHERE-- content.metadata.widget.appCode is not nullcontent.appCode not like '%CoW%'and content.appCode not like '%Cow%'and content.metadata.partnerFee.recipient is not nullGROUP BY 1,2,3,4)selectaggregate_by,app_code,widget_app_code,widget_environment,volume,SUM(volume) OVER (partition by app_code ORDER BY aggregate_by NULLS FIRST ) AS cumulative_volumefrom prep