Query editor
WITH renSUP AS (SELECT week, SUM(transfer) over (order by week) as renfil_supplyFROM ( SELECT date_trunc('week', evt_block_time) as week,sum(value/1e18) as transferFROM erc20."ERC20_evt_Transfer"WHERE contract_address = '\xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5' -- renFIL token contract addressAND "from" = '\x0000000000000000000000000000000000000000'GROUP BY 1UNIONSELECTdate_trunc('week', evt_block_time) as week,sum(-value/1e18) as transferFROM erc20."ERC20_evt_Transfer"WHERE contract_address = '\xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5' -- renFIL token contract addressAND "to" = '\x0000000000000000000000000000000000000000'GROUP BY 1) as net),TTL AS (SELECT renSUP.week AS week,renSUP.renfil_supply AS renfil_supplyFROM renSUP)SELECT TTL.week,(TTL.renfil_supply) as fil_on_ethereumFROM TTLORDER BY 1 DESCLIMIT 1