Query editor
-- Eligible fills whose stored quote is Dfusion's (0x5ed864e8…) or ours, 12-01 from 09:00Z, ETH,BTC <-> stable under 1,000 USD-- and stable/stable: who settled them; plus 40 sample uids per quote solver for the delivered-or-not read on the orderbook. 2026-12-01.with t as (select order_uid, tx_hash, block_time, usd_value, lower(to_hex(trader)) trader,if(sell_token_address = 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, sell_token_address) st,if(buy_token_address = 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, buy_token_address) btfrom cow_protocol_ethereum.tradeswhere block_time >= timestamp '2026-12-01 09:00' and block_time < timestamp '2026-12-02 00:00' and not partial_fill),od as (select order_uid, tx_hash, bool_or(is_eligible_for_quote_reward) el, max(lower(to_hex(cast(quote_solver as varbinary)))) qs,max(lower(to_hex(cast(solver as varbinary)))) svfrom dune.cowprotocol.dataset_prod_order_data_mainnet_2026_12 group by 1, 2),j as (select t.*, od.qs, od.sv,case when t.st in (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7, 0x6b175474e89094c44da98b954eedeac495271d0f) and t.bt in (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7, 0x6b175474e89094c44da98b954eedeac495271d0f) then 'stable/stable'when (t.st in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599) and t.bt in (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7, 0x6b175474e89094c44da98b954eedeac495271d0f)) or (t.bt in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599) and t.st in (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7, 0x6b175474e89094c44da98b954eedeac495271d0f)) or (t.st in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599) and t.bt in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599)) then 'ETH,BTC/stable'else 'other' end pcfrom t join od on od.order_uid = t.order_uid and od.tx_hash = t.tx_hashwhere od.el and od.qs in ('5ed864e8f37dcb4f79c5172a815d1b3a9147eaab', 'a7842153fde380a864726d0e91f14f6ffab7d46c')),smp as (select *, row_number() over (partition by qs, pc order by block_time desc) rn from j where pc <> 'other' and usd_value < 1000)select 'A' k, qs, pc, sv x, cast(count(*) as varchar) n, cast(sum(usd_value) as varchar) usd, '' uid, '' trader from j group by 2, 3, 4union allselect 'U', qs, pc, sv, cast(usd_value as varchar), cast(block_time as varchar), lower(to_hex(order_uid)), trader from smp where rn <= 25