Query editor
with x402_txs as (selecthash as tx_hash, block_numberfrom base.transactionswhere to = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913and bytearray_substring(data, 1, 4) = 0xe3ee160eand success = trueand block_time >= now() - interval '60' day),payments as (selectdate_trunc('week', t.block_time) as week_start, t.amount_usdfrom tokens.transfers tjoin x402_txs xon t.tx_hash = x.tx_hashand t.block_number = x.block_numberwhere t.blockchain = 'base'and t.contract_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913and t.amount_usd > 0and t.block_time >= now() - interval '60' dayand t.block_time < date_trunc('week', now()))selectweek_start, count(*) as tx_count, avg(amount_usd) as mean_usd, approx_percentile(amount_usd, 0.50) as median_usd, approx_percentile(amount_usd, 0.90) as p90_usdfrom paymentsgroup by week_startorder by week_start desc