Query editor
WITH tokens as (SELECTdate_trunc('month',evt_block_time) as date_time,'Ethereum' as chain,COUNT(*) as total_nftsFROM tokenbound_ethereum.ERC6551Registry_evt_AccountCreatedGROUP BY 1,2UNION ALLSELECTdate_trunc('month',evt_block_time) as date_time,'Base' as chain,COUNT(*) as total_nftsFROM tokenbound_base.ERC6551Registry_evt_AccountCreatedGROUP BY 1,2UNION ALLSELECTdate_trunc('month',evt_block_time) as date_time,'Polygon' as chain,COUNT(*) as total_nftsFROM tokenbound_polygon.ERC6551Registry_evt_AccountCreatedGROUP BY 1,2UNION ALLSELECTdate_trunc('month',evt_block_time) as date_time,'Optimism' as chain,COUNT(*) as total_nftsFROM tokenbound_optimism.ERC6551Registry_evt_AccountCreatedGROUP BY 1,2UNION ALLSELECTdate_trunc('month',evt_block_time) as date_time,'Arbitrum' as chain,COUNT(*) as total_nftsFROM tokenbound_arbitrum.ERC6551Registry_evt_AccountCreatedGROUP BY 1,2)SELECTdate_time,SUM(total_nfts) as nfts_created,SUM(SUM(total_nfts)) OVER (ORDER BY date_time) as cumulative_nftsFROM tokensWHERE date_time != date_trunc('month',now())GROUP BY 1ORDER BY date_time DESC