Query editor
with mad_lab_data as (select account_mint, token_symbol as collection, collection_mint as nft_contract_addressfrom tokens_solana.nftwhere token_symbol like '%MAD%'and collection_mint = 'J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w'),mab_lab_txn_data as (select 'solana' as blockchain, n.block_date, n.block_time, n.block_month,n.number_of_items, n.buyer, n.seller, n.amount_usd, n.account_mint, n.tx_id,m.collection, m.nft_contract_addressfrom nft_solana.trades n join mad_lab_data mon n.account_mint = m.account_mintwhere n.block_date < date('2025-09-24')),data_monthly as (selectblock_month, blockchain, collection, nft_contract_address,sum(coalesce(amount_usd,0)) as total_volume,count(distinct buyer) as total_buyers,count(distinct seller) as total_sellers,count(distinct tx_id) as total_transactions,sum(coalesce(number_of_items,0)) as total_salesfrom mab_lab_txn_datawhere block_date < date('2025-09-24')and account_mint is not nullgroup by 1,2,3,4),data_accumulate as (selectblockchain,block_month,collection,nft_contract_address,total_volume,total_buyers,total_sellers,total_transactions,total_sales,-- accumulatesum(total_volume) over (partition by nft_contract_address order by block_month) as accumulate_volume,sum(total_sales) over (partition by nft_contract_address order by block_month) as accumulate_sales,sum(total_transactions) over (partition by nft_contract_address order by block_month) as accumulate_transactionsfrom data_monthlyorder by block_month)select * from data_accumulatewhere block_month > date('2024-12-31')