Query editor
WITH e AS (SELECT cast(json_extract_scalar(data,'$.amount_in') as decimal(38,0)) AS amt_in,json_extract_scalar(data,'$.from_token') AS ft,json_extract_scalar(data,'$.pool') AS poolFROM aptos.eventsWHERE block_date = DATE '2026-04-06'AND event_type = '0x4bf51972879e3b95c4781a5cdcb9e1ee24ef483e7d22f2d903626f126df62bd1::liquidity_pool::SwapEvent'AND tx_success)SELECT pool, ft, count(*) n, cast(sum(amt_in) as varchar) sinFROM e GROUP BY 1,2 ORDER BY 3 DESC