Query editor
with ape_purchased_event_logs as (SELECTblock_hash, bytearray_ltrim (topic1) as playerAddress, bytearray_to_uint256(topic2) as amountApePurchased, tx_hash, block_timeFROM ethereum.logsWHEREtopic0 = 0x854b9652b54e460736e98c16b01accf780b6473ab6c733952caa8971a583f6faAND contract_address = 0x4e8ca5cb9FCA486d09EE7C8dBbFe99AC96Ec1982AND block_time >= TIMESTAMP '2023-06-22 00:00:00'), daily_transfer_details as (SELECTdate_trunc('day', block_time) as block_date, count(distinct playerAddress) as daily_purchased_unique_wallet, SUM(amountApePurchased) as daily_ape_usedfrom ape_purchased_event_logsGROUP BY 1ORDER BY 1)SELECTblock_date, daily_purchased_unique_wallet, daily_ape_used, sum(daily_ape_used) over (order by block_date asc) as accumulate_ape_usedfrom daily_transfer_details