Query editor
with prev as (select * from table(previous.query.result(schema => descriptor(day timestamp(3), unique_participants bigint)))),checkpoint as (select coalesce(max(day), timestamp '2025-06-01') - interval '1' day as cutofffrom prev),cc_mints as (select account_mintfrom mpl_token_metadata_solana.mpl_token_metadata_call_createwhere call_block_date >= date '2025-06-01'and account_updateAuthority in ('cc2UvAphSgLGd7A9MgRMo3ZUeSvAoagkFtSURGkLTYF', 'cc3novbXuNSe292qKH2gGhxToaWjuBvJbA7zQf8NVxi')unionselect account_mintfrom mpl_token_metadata_solana.mpl_token_metadata_call_createmetadataaccountv3where call_block_date >= date '2025-06-01'and account_updateAuthority in ('cc2UvAphSgLGd7A9MgRMo3ZUeSvAoagkFtSURGkLTYF', 'cc3novbXuNSe292qKH2gGhxToaWjuBvJbA7zQf8NVxi')),cc_trades as (select t.block_time, t.buyer, t.sellerfrom nft_solana.trades tinner join cc_mints m on m.account_mint = t.account_mintwhere t.block_date >= (select cutoff from checkpoint)and t.trade_category = 'buy'),sides as (select date_trunc('day', block_time) as day, buyer as wallet from cc_tradesunionselect date_trunc('day', block_time) as day, seller as wallet from cc_trades),new_data as (selectday, count(distinct wallet) as unique_participantsfrom sidesgroup by 1)select day, unique_participants from prevwhere day < (select cutoff from checkpoint)union allselect day, unique_participants from new_dataorder by day desc