Query editor
-- select * from monad_testnet.logs where tx_hash = 0xb1740c44fc46dc52414bbe209805e3ace255f1dfecf089bd8e43c8af85fcff01 and block_time > now() - interval '1' day-- topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef-- and contract_address = 0x0efed4d9fb7863ccc7bb392847c08dcd00fe9be2-- topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef-- and contract_address = 0x760afe86e5de5fa0ee542fc7b7b713e1c5425701with mubond as (select block_time, tx_hash, topic1, topic2, bytearray_to_int256(min_by(data, index)) as mubond_amountfrom monad_testnet.logswhere block_time > now() - interval '14' dayand topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand contract_address = 0x0efed4d9fb7863ccc7bb392847c08dcd00fe9be2and bytearray_to_int256(data) != 0-- and tx_hash = 0xb1740c44fc46dc52414bbe209805e3ace255f1dfecf089bd8e43c8af85fcff01group by 1, 2, 3, 4), wmon as (select block_time, tx_hash, bytearray_to_int256(min_by(data, index)) as wmon_amountfrom monad_testnet.logswhere block_time > now() - interval '14' dayand topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand contract_address = 0x760afe86e5de5fa0ee542fc7b7b713e1c5425701and bytearray_to_int256(data) != 0-- and tx_hash = 0xb1740c44fc46dc52414bbe209805e3ace255f1dfecf089bd8e43c8af85fcff01group by 1, 2)selectdate_trunc('hour', m.block_time) as hour_, count(*) as swaps, round(avg(mubond_amount/wmon_amount),1) as rate, sum(wmon_amount)/1e18 as volume_mon, sum(case when topic1 = 0x000000000000000000000000b108f3388687eabf9a7247124734fa3b85610403or topic2 = 0x000000000000000000000000b108f3388687eabf9a7247124734fa3b85610403then 1 else 0 end) as uni_trades, sum(case when topic1 = 0x0000000000000000000000007e2ddee582144046140c83d31432b03b98028be3or topic2 = 0x0000000000000000000000007e2ddee582144046140c83d31432b03b98028be3then 1 else 0 end) as bean_trades, sum(case when topic1 = 0x000000000000000000000000c7456d3c77483b909ccafbd764ac16c43c6647e4or topic2 = 0x000000000000000000000000c7456d3c77483b909ccafbd764ac16c43c6647e4then 1 else 0 end) as octo_tradesfrom mubond m inner join wmon w on m.tx_hash = w.tx_hashgroup by 1order by 1