Query editor
SELECT*,deposit - LAG(deposit) OVER (ORDER BY day ASC) AS _deposit,(deposit - LAG(deposit) OVER (ORDER BY day ASC))/(LAG(deposit) OVER (ORDER BY day ASC)) * 100 AS _deposit_change,compound - LAG(compound) OVER (ORDER BY day ASC) AS _compound,(compound - LAG(compound) OVER (ORDER BY day ASC))/(LAG(compound) OVER (ORDER BY day ASC)) * 100 AS _compound_change,referral_deposit - LAG(referral_deposit) OVER (ORDER BY day ASC) AS _referral_deposit,(referral_deposit - LAG(referral_deposit) OVER (ORDER BY day ASC))/(LAG(referral_deposit) OVER (ORDER BY day ASC)) * 100 AS _referral_deposit_change,claim - LAG(claim) OVER (ORDER BY day ASC) AS _claim,(claim - LAG(claim) OVER (ORDER BY day ASC))/(LAG(claim) OVER (ORDER BY day ASC)) * 100 AS _claim_change,net_usdc_flow - LAG(net_usdc_flow) OVER (ORDER BY day ASC) AS _net_usdc_flow,(net_usdc_flow - LAG(net_usdc_flow) OVER (ORDER BY day ASC))/(LAG(net_usdc_flow) OVER (ORDER BY day ASC)) * 100 AS _net_usdc_flow_change,net_usdc_inflow - LAG(net_usdc_inflow) OVER (ORDER BY day ASC) AS _net_usdc_inflow,(net_usdc_inflow - LAG(net_usdc_inflow) OVER (ORDER BY day ASC))/(LAG(net_usdc_inflow) OVER (ORDER BY day ASC)) * 100 AS _net_usdc_inflow_change,net_usdc_outflow - LAG(net_usdc_outflow) OVER (ORDER BY day ASC) AS _net_usdc_outflow,(net_usdc_outflow - LAG(net_usdc_outflow) OVER (ORDER BY day ASC))/(LAG(net_usdc_outflow) OVER (ORDER BY day ASC)) * 100 AS _net_usdc_outflow_changeFROM(SELECTDATE_TRUNC('day',hour) AS day,SUM(deposit) AS deposit,SUM(compound) AS compound,SUM(referral_deposit) AS referral_deposit,SUM(claim) AS claim,SUM(net_usdc_flow) AS net_usdc_flow,SUM(net_usdc_inflow) AS net_usdc_inflow,SUM(net_usdc_outflow) AS net_usdc_outflowFROMquery_3309177GROUP BY1)ORDER BY1 DESC