Query editor
with prev as (select * from table(previous.query.result(schema => descriptor(day timestamp(3), burn_txs bigint, cards_burned double)))),checkpoint as (select coalesce(max(day), timestamp '2025-06-01') - interval '1' day as cutofffrom prev),new_data as (selectdate_trunc('day', block_time) as day, count(distinct tx_id) as burn_txs, sum(amount_display) as cards_burnedfrom tokens_solana.transferswhere block_date >= (select cutoff from checkpoint)and symbol = 'CARDS'and action = 'burn'group by 1)select day, burn_txs, cards_burned from prevwhere day < (select cutoff from checkpoint)union allselect day, burn_txs, cards_burned from new_dataorder by day desc