Query editor
WITH pokemon_transaction_hashes AS (SELECTblock_time,tx_hash,"from","to",contract_address,token_id,token_standardFROM nft.transfersWHEREblockchain = 'polygon'AND contract_address = 0x251be3a17af4892035c37ebf5890f4a4d889dcad)select *,sum(transactions) over (order by month) as total_transactions,sum(total_vol_usd) over (order by month) as cumu_total_vol_usdfrom (selectdate_trunc('month', evt_block_time) as month,token_address,count(distinct evt_tx_hash) as transactions,sum(total_usd_amt) as total_vol_usdfrom (SELECTevt_block_time,evt_tx_hash,token_address,SUM(token_amount) AS total_token_amt,SUM(usd_amount) AS total_usd_amtFROM (SELECTwallet_address,evt_block_time,evt_tx_hash,token_address,SUM(amount_raw/pow(10,decimals)) AS token_amount,SUM(amount_raw/pow(10,decimals) * avg_price) AS usd_amountFROM(SELECTevt_block_time,evt_tx_hash,wallet_address,token_address,amount_rawFROM transfers_polygon.erc20WHERE evt_tx_hash IN (SELECT DISTINCT tx_hash FROM pokemon_transaction_hashes)AND evt_block_time >= timestamp '2023-07-24'