Query editor
select-- WE MARGINALIZE OUT fraction_distance_from_mid_price and side (buy/sell) and partial/filled categorycoin, order_type-- , side, time_in_force-- , last_status-- , category, case when perc_distance_from_mid_price < 0 then '- side:' else '+ side:' end || ' ' || order_type || ' ' || time_in_force || ' ' || case when last_status = 'partial fill' then 'filled' else last_status end AS category2-- , perc_distance_from_mid_price / 100. as fraction_distance_from_mid_price --for plotting purposes, SUM(frequency) as frequency, SUM(total_usd_open) as total_usd_open, SUM(total_usd_unfilled) AS total_usd_unfilled, (SUM(total_usd_open) - SUM(total_usd_unfilled)) / SUM(total_usd_open) AS fraction_filled, SUM(unique_users) AS unique_usersfrom dune.ramiro_mata.dataset_hl_slippage_in_marketable_limit_orders_filled_vs_unfilledwhere ABS(perc_distance_from_mid_price) < 17 -- zoom-in/outAND last_status IN ('filled', 'partial fill', 'canceled')group by 1, 2, 3, 4order by fraction_filled desc --category2 asc