Query editor
with prev as (select * from table(previous.query.result(schema => descriptor(day timestamp(3), dau bigint, gacha_plays bigint, volume_usd 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, approx_distinct(from_owner) as dau, approx_distinct(tx_id) as gacha_plays, sum(amount_usd) as volume_usdfrom tokens_solana.transferswhere block_date >= (select cutoff from checkpoint)and to_owner = 'GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3'and token_mint_address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'and action = 'transfer'and amount_usd >= 24group by 1)select day, dau, gacha_plays, volume_usd from prevwhere day < (select cutoff from checkpoint)union allselect day, dau, gacha_plays, volume_usd from new_dataorder by day desc