Query editor
with outbound_raw as (selectblock_time, tx_hash, "from" as sender, "to" as receiver, amount / 1e6 as usdc_outfrom tokens_ethereum.transferswhere contract_address = {{token_address}}and "from" = {{target_wallet}}and block_time >= now() - INTERVAL '{{lookback_day}}' DAY), outbound_tx as (selectMIN(block_time) as out_time, tx_hash, sender, receiver, SUM(usdc_out) as usdc_out_txfrom outbound_rawgroup bytx_hash, sender, receiver), big_moves as (select*from outbound_txwhere usdc_out_tx >= {{big_move}}), post_activity as (selectb.out_time, b.tx_hash, b.receiver, b.usdc_out_tx, (selectCOUNT(*)from tokens_ethereum.transfers twhere t.contract_address = {{token_address}}and t."from" = {{target_wallet}}and t.block_time > b.out_timeand t.block_time <= b.out_time + INTERVAL '7' DAY) as from_cnt_next7d, (selectCOUNT(*)from tokens_ethereum.transfers twhere t.contract_address = {{token_address}}and t."to" = {{target_wallet}}and t.block_time > b.out_timeand t.block_time <= b.out_time + INTERVAL '7' DAY) as to_cnt_next7d, (selectCOUNT(*)from tokens_ethereum.transfers twhere t.contract_address = {{token_address}}