Query editor
WITH tokens AS(SELECTcontract_address,symbol,decimals-- ,backingFROM tokens.erc20_stablecoinswhere blockchain = 'mantle'union allselect 0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a, 'AUSD', 6),mint as(select block_date, amountfrom tokens_mantle.transfers a join tokens b on a.contract_address = b.contract_addresswhere block_month >= date('2023-07-01')and "from" = 0x0000000000000000000000000000000000000000union allselect block_date, -amountfrom tokens_mantle.transfers a join tokens b on a.contract_address = b.contract_addresswhere block_month >= date('2023-07-01')and "to" = 0x0000000000000000000000000000000000000000),t1 as(select block_date as dt-- ,sum(amount) amount,SUM(SUM(amount)) OVER (ORDER BY block_date) AS supplyfrom mintgroup by 1),t2 as(select *,LAG(supply,1) OVER (ORDER BY dt) as supply_1,LAG(supply,7) OVER (ORDER BY dt) as supply_7from t1where dt >= date('2025-01-01') and dt < current_date)select *,cast(supply as double)/cast(supply_1 as double)*100-100 as change_1d,cast(supply as double)/cast(supply_7 as double)*100-100 as change_7d,supply/1000000 as supply_afrom t2ORDER BY 1 DESC