Query editor
/*Table(s): lido.accounting, lido.liquidityReason: Curated dataset recommendationsTable(s): lido_ethereum.steth_evt_tokenrebasedReason: Based on contract addresses or possible project names*/WITH MonthlyFees AS (SELECTDATE_TRUNC('month', period) AS month,base_token,SUM(value_usd) AS total_feesFROM lido.accountingWHEREperiod >= CURRENT_DATE - INTERVAL '1' yearGROUP BY1,2), MoMChanges AS (SELECTmonth,base_token,total_fees,LAG(total_fees) OVER (PARTITION BY base_token ORDER BY month) AS previous_month_fees,(total_fees - LAG(total_fees) OVER (PARTITION BY base_token ORDER BY month)) / LAG(total_fees) OVER (PARTITION BY base_token ORDER BY month) * 100 AS mom_changeFROM MonthlyFees)SELECTmonth,base_token,total_fees,mom_changeFROM MoMChangesORDER BYmonth,base_token