Query editor
with tmp as (selectdate_trunc('month', block_time) as dt,sum(amount_usd) as amount_usdfromdex.tradeswhereblockchain = 'arbitrum'-- and block_time >= now() - interval '30' daygroup by 1)select*,sum(amount_usd) over(order by dt asc) as total_amount_usd,avg(amount_usd) over(order by dt rows between 2 preceding and current row ) as amount_usd_3m_ma,(amount_usd - avg(amount_usd) over(order by dt rows between 2 preceding and current row ))/avg(amount_usd) over(order by dt rows between 2 preceding and current row )*100.00 as delta_amt_usd_vs_3m_mafrom tmporder by dt desc