Query editor
WITHL1Escrow AS (SELECTDATE_TRUNC('week', evt_block_time + INTERVAL '1' year) AS day1,SUM(snxRewards / CAST(1e18 AS DOUBLE)) AS L1_Escrow_ReleaseFROMsynthetix_ethereum.FeePool_evt_FeesClaimedWHEREevt_block_time > NOW() - INTERVAL '365' dayGROUP BY1ORDER BYday1 NULLS FIRST),L2Escrow AS (SELECTDATE_TRUNC('week', evt_block_time + INTERVAL '1' year) AS day1,SUM(snxRewards / CAST(1e18 AS DOUBLE)) AS L2_Escrow_ReleaseFROMsynthetix_optimism.FeePool_evt_FeesClaimedWHEREevt_block_time > NOW() - INTERVAL '365' dayGROUP BY1ORDER BYday1 NULLS FIRST)SELECTt1.day1,L1_Escrow_Release,L2_Escrow_Release,L1_Escrow_Release + L2_Escrow_Release AS Total_Release,SUM(L1_Escrow_Release) OVER (ORDER BYt1.day1 NULLS FIRST) AS Cumulative_Release_L1,SUM(L2_Escrow_release) OVER (ORDER BYt1.day1 NULLS FIRST) AS Cumulative_Release_L2,SUM(L2_Escrow_release + L1_Escrow_release) OVER (ORDER BYt1.day1 NULLS FIRST) AS Cumulative_Release_TotalFROML1Escrow AS t1LEFT JOIN l2Escrow AS t2 ON t1.day1 = t2.day1ORDER BYday1 DESC