Query editor
-- calculates number transactions, total volume, number wallets who transact using eur denominated stablecoins-- query cost initial run (default checkpoint: )with prev AS (select * from TABLE(previous.query.result(schema => descriptor(time TIMESTAMP(3),symbol VARCHAR,txs BIGINT,wallets BIGINT,-- destinations BIGINT,volume DOUBLE)))), checkpoint AS (-- date is a month --> cut-off: first day of month => make alignment that date = month explicit-- coalesce used to indicate start of your data interest periodselect date_trunc('month',COALESCE(MAX(time), TIMESTAMP '2026-01-01') - INTERVAL '1' MONTH) AS cutoffFROM prev)-- recompute from cutoff onwards, new_evm_data as ( --evm tradedselectdate_trunc('month', block_time) as time,symbol,count(distinct tx_hash) as txs,count(distinct "from") as wallets,-- count(distinct "to") as destinations,sum(amount) as volumefrom tokens.transferswhere contract_address IN (select distinct from_hex(contract_address)from query_7529059where chain NOT IN ('Solana', 'Stellar'))-- and blockchain IN (-- select distinct chain-- from query_7529059-- where chain NOT IN ('Solana', 'Stellar'))and block_time >= (select cutoff from checkpoint)-- exclude mints and burnsand "from" <> 0x0000000000000000000000000000000000000000and "to" <> 0x0000000000000000000000000000000000000000group by 1, 2)-- COMBINE OLD AND NEW DATA-- 3. Keep old data (before cutoff)-- select day as time, symbol, txs, wallets, destinations, volumeselect time, symbol, txs, wallets, volumefrom prevwhere time < (SELECT cutoff FROM checkpoint)UNION ALLselecttime,