Query editor
with new_transfers as (SELECT to as wallet , min(evt_block_time) as time from erc20_{{blockchain}}.evt_Transferwhere contract_address = {{token_address}}GROUP BY 1),new_wallets as (SELECT count(*) as new_wallets, date_trunc('day', time) as day FROM new_transfersGROUP BY 2),prices as (SELECT avg(price) as price, date_trunc('day', minute) as day FROM prices.usdwhere contract_address = {{token_address}}and blockchain = '{{blockchain}}'and minute > now() - interval '{{last_n_days}}' dayGROUP BY 2)SELECTa.day,a.new_wallets as new_wallets_created,sum(a.new_wallets) OVER (ORDER BY a.day) as cum_new_walletsFROM new_wallets awhere a.day > now() - interval '{{last_n_days}}' dayORDER BY a.day DESC